| 329 | } |
| 330 | |
| 331 | void event::add_event_handler(handler& handler_, EVENT_TYPE type) { |
| 332 | int cas_zero = 0; |
| 333 | while(!handlers_lock.compare_exchange_strong(cas_zero, handlers_locked)) { |
| 334 | this_thread::yield(); |
| 335 | } |
| 336 | handlers.insert(pair<EVENT_TYPE, handler&>(type, handler_)); |
| 337 | handlers_lock = 0; |
| 338 | } |
| 339 | |
| 340 | void event::add_internal_event_handler(handler& handler_, EVENT_TYPE type) { |
| 341 | int cas_zero = 0; |
nothing calls this directly
no test coverage detected