Displaying 2 results from an estimated 2 matches for "shout_set_host_safe_ts".
2008 Sep 10
2
Updated version of patch
...priate locking around accesses to s->conn.
It is a little hard to figure out precisely at what places
locking would be needed.
The safest method I could think off is simply to include
thread safe versions of the shout api functions which
have a shout_t as its first argument. For example
int shout_set_host_safe_ts(shout_t *self, char* host, pthread_mutex_t
*mutex){
int ret;
pthread_mutex_lock (mutex));
ret=shout_set_host(s->conn,host);
pthread_mutex_unlock (mutex));
return ret;
}
One should then use the thread safe version instead of the original api
functions.
To avoid mistakes I would gene...
2008 Aug 30
3
Updated version of patch
Attached is a patch against shout-python-0.2 which does two trivial but
very useful things
(1) The function "get_connected" is exported so that shout-python
becomes usable
in nonblocking mode. In the current version of shout-python "open"
raises an exception in nonblocking mode.
(2) The global interpreter lock is released in the potentially blocking
functions