Re: race condition without multiple threads?



G Hasse said:
[...]
If I were you I should get rid of all threads all to gether.
[...]

Thanks for the suggestion.
What I was trying to get accross, however, was that for all practical
purposes I HAVE just a single thread.
[ In fact I have two (the main loop writing smth. to a file and another
thread writing smth. to the same file ... all with mutex locks and
everything). But the second thread has no interaction with the GUI except
that it also stops when the main loop sets the state machine of the first
stuff to STOP. The second thread never updates the GUI, and the problem also
appears if I disable the second thread altogether. ]

This is exactly why I'm so mistified about where the parallelism may
come from that I seem to be seeing.

In other words:

- does GTK work like that? Are there things working asynchronously
    that may cause such problems with write-and-read-back operations
    (or in this case read-and-write-back?!?)
- has smbd. else seen such problems? ... found a way around them?
- Or am I on a completely wrong track? And does smbd. have a better
    pointer to where to look?

Karl.








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]