gtkc.gthreadtypes.GPrivate Struct Reference


Detailed Description

The GPrivate struct is an opaque data structure to represent a thread private data key.

Threads can thereby obtain and set a pointer which is private to the current thread. Take our give_me_next_number() example from above. Suppose we don't want current_number to be shared between the threads, but instead to be private to each thread. This can be done as follows: Example10.Using GPrivate for per-thread data


SourceForge.net Logo DSource.org Logo digitalmars.com Logo