add_marshal_guards


Description:

public void add_marshal_guards (void* pre_marshal_data, ClosureNotify pre_marshal_notify, void* post_marshal_data, ClosureNotify post_marshal_notify)

Adds a pair of notifiers which get invoked before and after the closure callback, respectively.

This is typically used to protect the extra arguments for the duration of the callback. See watch_closure for an example of marshal guards.

Parameters:

this

a Closure

pre_marshal_data

data to pass to pre_marshal_notify

post_marshal_data

data to pass to post_marshal_notify

post_marshal_notify

a function to call after the closure callback

pre_marshal_notify

a function to call before the closure callback