Project

General

Profile

Actions

Feature #2331

closed

Signal: once

Added by Junxiao Shi almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Utils
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
1.00 h

Description

Add a helper method to Signal template to hook a handler that executes only once.

Connection connectSingleShot(Handler handler);

The connection will be automatically disconnected after handle is executed once.


Related issues 1 (0 open1 closed)

Blocks NFD - Task #2300: Face: use SignalClosedJunxiao Shi

Actions
Actions #1

Updated by Junxiao Shi almost 10 years ago

Actions #2

Updated by Davide Pesavento almost 10 years ago

I suggest the name connectSingleShot for the new method.

Actions #3

Updated by Davide Pesavento almost 10 years ago

By the way, would this API addition provide a solution for #2313 note-5 ?

Actions #4

Updated by Junxiao Shi almost 10 years ago

  • Description updated (diff)

I agree with the name in note-2.

FaceTable::remove will be connected as single shot, but a single-shot connection is like any other Connection, and this won't solve #2313 note-5 problem.

Actions #5

Updated by Junxiao Shi almost 10 years ago

  • Status changed from New to In Progress
Actions #6

Updated by Junxiao Shi almost 10 years ago

  • Status changed from In Progress to Code review
Actions #7

Updated by Alex Afanasyev almost 10 years ago

Why this feature is necessary? What is the use case?

Actions #8

Updated by Junxiao Shi almost 10 years ago

Why this feature is necessary? What is the use case?

See #2300 note-10.

Actions #9

Updated by Junxiao Shi almost 10 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF