[ Version ( deprecated_since = "2.32" , since = "2.10" ) ]
public static void @foreach (Func<Thread<T>> thread_func)

Warning: @foreach is deprecated since 2.32.

Call thread_func on all Threads that have been created with create.


There aren't many things you can do with a Thread, except comparing it with one that was returned from create. There are better ways to find out if your thread is still alive.

Note that threads may decide to exit while thread_func is running, so without intimate knowledge about the lifetime of foreign threads, thread_func shouldn't access the GThread* pointer passed in as first argument. However, thread_func will not be called for threads which are known to have exited already.

Due to thread lifetime checks, this function has an execution complexity which is quadratic in the number of existing threads.



function to call for all Thread structures


second argument to thread_func