[PPL-devel] Thread Safety

Enea Zaffanella zaffanella at cs.unipr.it
Wed Aug 10 09:59:03 CEST 2016


Hello John.

The library, as is, is not thread safe (the main reason is that it uses 
a bunch of static caches to speed up single-threaded computations).

Maxim Gaina, a student under my supervision, produced a version of the 
library which is conditionally thread safe: safety is achieved as long 
as each thread has exclusive access to the PPL objects it works on. That 
is, either the objects are not shared between threads or the application 
code makes sure that shared objects are accessed at different times 
(e.g., using mutexes). The thread-safe version uses C++11 constructs and 
it was considering the C++ and C language interfaces only. For testing 
purposes, Maxim produced multi-threaded variants of demo programs 
ppl_lcdd and ppl_lpsol.

Afaict, Roberto was considering whether or not the work of Maxim was to 
be added to the main PPL library.

Cheers,
Enea


On 08/09/2016 11:23 PM, John Paulson wrote:
> Hi Developers,
>
> I have been using PPL for a couple of years, and I have just become 
> interested in parallelizing an application I wrote that calls it. I 
> tried to do this (using a parallel_for loop from TBB), but I ran into 
> varied errors at run time.
>
> I noticed that in the TODO file of the PPL distribution that it has 
> "Make the library thread-safe" on the list. Has this been done yet? 
> Would the lack of thread safety lead to strange run time errors?
>
>
> Best,
> John C. Paulson
>
>
> _______________________________________________
> PPL-devel mailing list
> PPL-devel at cs.unipr.it
> http://www.cs.unipr.it/mailman/listinfo/ppl-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cs.unipr.it/pipermail/ppl-devel/attachments/20160810/c0281ef6/attachment.htm>


More information about the PPL-devel mailing list