Page MenuHomePhabricator

eio/fallback: fix fallback shutdown when threads exist
ClosedPublic

Authored by zmike on Jun 26 2018, 3:31 PM.

Details

Summary

threads should not be waited on here during shutdown since these same
threads may be waiting on the main loop anyway

instead, perform as much deallocation as possible,
mark the monitor as deleted, and then set the thread to canceled and
allow the thread to clean itself up during its cancel/end callback

@fix
Depends on D6439

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zmike created this revision.Jun 26 2018, 3:31 PM
zmike requested review of this revision.Jun 26 2018, 3:31 PM
ManMower added inline comments.Jun 27 2018, 10:16 AM
src/lib/eio/eio_monitor_poll.c
230

Can we just use the !timer_hash test instead of adding backend->delete_me?

zmike added inline comments.Jun 27 2018, 10:22 AM
src/lib/eio/eio_monitor_poll.c
230

No, they are different cases. One indicates that the monitor was destroyed, the other indicates the eio_shutdown was called.

ManMower accepted this revision.Jun 27 2018, 10:25 AM
This revision is now accepted and ready to land.Jun 27 2018, 10:25 AM
Closed by commit rEFL1b18a4e67971: eio/fallback: fix fallback shutdown when threads exist (authored by zmike, committed by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhyJun 28 2018, 9:11 AM
This revision was automatically updated to reflect the committed changes.