Skip to content
This repository was archived by the owner on Aug 19, 2021. It is now read-only.

Commit 24b06ad

Browse files
committed
Added dispatch_forever as a separate function with no timeout
Unfortunately, with the recent addition of a type-infering `callback` function, the overloaded `dispatch` member function creates an ambiguity when passed to threads. With `dispatch_forever` function, a thread for the event queue can be started simply like this: t.start(&queue, &EventQueue::dispatch_forever); Thanks to @bogdanm for the find
1 parent 74e40e2 commit 24b06ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

EventQueue.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ class EventQueue {
7575
* value will dispatch events indefinitely
7676
* (default to -1)
7777
*/
78-
void dispatch(int ms);
79-
void dispatch() { dispatch(-1); }
78+
void dispatch(int ms=-1);
79+
void dispatch_forever() { dispatch(); }
8080

8181
/** Break out of a running event loop
8282
*

0 commit comments

Comments
 (0)