enthought/distarray — pull request #284 by kwmsmith (2014-04-04 19:51:04+00:00)
Title: Don't cache the context when localized / vectorized functions are first called

Closes #283

The `@local` and `@vectorize` decorators cached the context used when the decorated function is first called. If this function is ever called using a different context, then the cached (wrong) context is used rather than the up-to-date one, leading to hangs and exceptions.

This PR resolves the issue.