Master

Merged
#21 · Created  · Last updated

Merged pull request

Merged in jsouthwell/cocinasync (pull request #21)

6608ed8·Author: ·Closed by: ·2017-07-01

Description

  • Fix potential deadlock when destroying from main thread and some other code is synchronizing at the same time.

  • Fix bug that prevents using a TAsync instance from a background thread.

  • protect against race condition in visit() and invalid pointer access when removing during visit().

  • Properly dereference pointers. Delphi doesn't care but FPC might. FPC isn't an issue today due to missing anonymous methods, but planning ahead.

  • fixed THash.Has incorrectly returning True for items that are not included

  • Fixing deadlock in hash visits.

    NOTE: it is only safe to visit from one thread at a time, though setting and getting hash values can be done from many threads simulaneously, and also at the same time as a visit.

  • Fix test case for OnDo to not depend on synchronize

  • switched spinwait to visit removal instead of get since it can result in a deadlock on threaded gets.

  • Protect against removed items returning true for has[]

  • Add mode to use TCritiacal section instead of synchronize to main thread.

  • Add hash remove to profiler.

  • Add Hash Remove test.

  • Addresses Issue #9.

  • Correct WaitForAll use in Test to keep it from failing now that implementation is correct.

  • Support waiting on individual jobs Refactor global functions to static JobManager class Create new JobQueue class for collection of jobs that need to be waited on instead of all jobs in the global job class.

  • Fix job tests. And new tests for JobQueues and new result type jobs.

  • Fix stopwatch usage. Add another wait overload.

  • Add inline back in for job wait.

  • Improve performance of TAsync helpers by using Jobs instead of anonymous threads where possible.

  • Fixed and improved the OnDo test

  • Uncomment jobs that were accidentally commented out in a check-in.

0 attachments

0 comments

Loading commits...