Re: [fpc-pascal] threads, memory barriers and RTLeventSetEvent / RTLeventWaitFor

2019-10-03 Thread Jonas Maebe
On 01/10/2019 20:48, Sven Barth via fpc-pascal wrote: > Martin mailto:f...@mfriebe.de>> schrieb am Di., 1. Okt. > 2019, 17:19: > > Therefore my question: > Does RTLeventSetEvent / RTLeventWaitFor make sure memory is > synchronized > between threads? > > The functions themselves

Re: [fpc-pascal] threads, memory barriers and RTLeventSetEvent / RTLeventWaitFor

2019-10-01 Thread Sven Barth via fpc-pascal
Martin schrieb am Di., 1. Okt. 2019, 17:19: > I am currently looking at a strange issue in FpDebug. > > The main thread loads a lot of data from a file, and creates various > objects. > > Then some code is executed in a sub-thread. The timing of that > (start/stop of the 2 threads) is handled by

[fpc-pascal] threads, memory barriers and RTLeventSetEvent / RTLeventWaitFor

2019-10-01 Thread Martin
I am currently looking at a strange issue in FpDebug. The main thread loads a lot of data from a file, and creates various objects. Then some code is executed in a sub-thread. The timing of that (start/stop of the 2 threads) is handled by RTLeventSetEvent / RTLeventWaitFor. This code does