Page MenuHomePhabricator

Implements a HostThread class.

Authored by zturner on Aug 28 2014, 2:51 PM.



This class implements a host thread for the different platforms. As with HostProcess, no code has been updated to use HostThread yet, as this will clutter up the code review unnecessarily. However, the methods of HostThread generally map to methods of Host, so the conversion should be mostly mechanical. Because the actual conversion of client code has not been updated to use HostThread yet, it means the code in HostThread is largely duplicated. This duplication will be removed after the transition takes place.

I'm not super good at Linux, MacOSX, or FreeBSD, so I've included various people as reviewers in hopes of catching anything I may have implemented incorrectly. But don't feel obligated to review everything.

I've compiled and tested these changes on Mac, Linux, and Windows. (note, however, since nobody has been updated to use HostThread yet, there's little to actually test).

Diff Detail

Event Timeline

zturner updated this revision to Diff 13058.Aug 28 2014, 2:51 PM
zturner retitled this revision from to Implements a HostThread class..
zturner updated this object.
zturner edited the test plan for this revision. (Show Details)
zturner added reviewers: majnemer, rnk, emaste, tfiala.
zturner added a subscriber: Unknown Object (MLST).
majnemer edited edge metadata.Aug 28 2014, 3:49 PM

Suspend and Resume are a little questionable, why do we need them? They can make reasoning about threads way more challenging and can almost always be replaced by an explicit synchronization mechanism.

tfiala edited edge metadata.Sep 5 2014, 4:20 PM

Trying this out locally now.

zturner accepted this revision.May 27 2015, 1:32 PM
zturner added a reviewer: zturner.
This revision is now accepted and ready to land.May 27 2015, 1:32 PM
zturner closed this revision.May 27 2015, 2:10 PM