GlobalEvents: lock-less operation using std::atomic

Use a bit field instead of a mutex-protected bool array.
This commit is contained in:
Max Kellermann
2013-01-10 00:57:18 +01:00
parent ecd5eb02c5
commit 5c3c506638
3 changed files with 9 additions and 39 deletions

View File

@@ -58,13 +58,6 @@ namespace GlobalEvents {
void Register(Event event, Handler handler);
void Emit(Event event);
/**
* Similar to event_pipe_emit(), but aimed for use in signal handlers:
* it doesn't lock the mutex, and doesn't log on error. That makes it
* potentially lossy, but for its intended use, that does not matter.
*/
void FastEmit(Event event);
}
#endif /* MAIN_NOTIFY_H */