Many thanks for answer!

"free" That was also my thought, I thought because there is a method "public uint <https://valadoc.org/glib-2.0/uint.html> *unprocessed*()", maybe there is a possibility of getting rid of the "*unprocessed*"...


Am 14.04.19 um 16:34 schrieb Al Thomas via vala-list:
> On Sunday, 14 April 2019, 14:44:46 BST, Wolfgang Mauer <wolfgang.ma...@kabelmail.de> wrote: > is it possible to remove all "unprocessed" Threads in a ThreadPool?
Practically I would like to remove all "pending/unprocessed" thread in
the pool before I add a new one.
You could use the ThreadPool's move_to_front () to prioritise the new task.I 
understand ThreadPool to be a parallelised version of foreach. A functionis 
passed in when the ThreadPool is created and data is then fed in with push ().

If the processing is complete and you want to remove the remaining data to 
starta new run then use free () and create a new ThreadPool. That's the only 
way Ican think of.
Some references if it 
helps:http://changelog.ca/log/2012/10/09/vala_glib_thread_poolhttps://stackoverflow.com/questions/29883007/gthreadpool-is-not-creating-more-than-n-threadshttps://developer.gnome.org/glib/stable/glib-Thread-Pools.html
Al
_______________________________________________
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list
_______________________________________________
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to