get_io_channel


Description:

[ Version ( since = "4.2.9" ) ]
public weak IOChannel get_io_channel ()

Allow this to notify when an execution job is finished, by making its exec ID readable through a new IOChannel.

This function is useful when the notification needs to be included into a main loop. This also notifies that signals (emitted by objects in this's internal thread) are available.

The returned IOChannel will have something to read everytime an execution job is finished for an execution job submitted from the calling thread. The user whould read ThreadNotification structures from the channel and analyse its contents to call iterate or fetch_result.

Note1: the new communication channel will only be operational for jobs submitted after this function returns, and for signals which have been connected after this function returns. A safe practice is to call this function before the this object has been used.

Note2: this function will return the same IOChannel everytime it's called from the same thread.

Note3: if the usage of the returned IOChannel reveals an error, then shutdown and g_io_channel_unref should be called on the IOChannel to let this know it should not use that object anymore.

Parameters:

this

a ThreadWrapper object

Returns:

a new IOChannel, or null if it could not be created