Package Bio :: Package config :: Module _support :: Class make_timed_function
[show private | hide private]
[frames | no frames]

Class make_timed_function


make_timed_function(function, timeout[, retval2pickleable_fn][, pickleable2retval_fn]) -> callable object

Create a version of function that times out if it does not complete within timeout seconds.

Currently, there's an implementation limitation such that function must return a pickleable object (or nothing). If the function returns an object that's not pickleable, then please set retval2pickleable_fn and pickleable2retval_fn to a pair of callbacks to convert the return value of the function to a pickleable form. If this is impossible, then this function should not be used.
Method Summary
  __init__(self, function, timeout, retval2pickleable_fn, pickleable2retval_fn)
  __call__(self, *args, **keywds)
  _call_fn(self, *args, **keywds)

Generated by Epydoc 2.1 on Mon Aug 27 16:13:11 2007 http://epydoc.sf.net