Skip to content

Commit

Permalink
monkey patch scatter
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ-Wright committed Sep 19, 2018
1 parent b14a898 commit 2532ed8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions news/scatter_mp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**Added:** None

**Changed:** None

**Deprecated:** None

**Removed:** None

**Fixed:**

* Monkey patch ``Stream.scatter`` to use the parallel backend

**Security:** None
6 changes: 6 additions & 0 deletions streamz_ext/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
from streamz.core import _global_sinks, _truthy


def scatter(self, **kwargs):
from .parallel import scatter
return scatter(self, **kwargs)

Stream.scatter = scatter

@Stream.register_api()
class starsink(Stream):
""" Apply a function on every element
Expand Down

0 comments on commit 2532ed8

Please sign in to comment.