Skip to content

Commit

Permalink
Make topics a set
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Oct 7, 2020
1 parent 2af1e26 commit 36ec668
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tractor/msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ async def _execute(
topics: Set[str],
*args,
# *,
task_name: str = None,
task_name: str = None, # default: only one task allocated
packetizer: Callable = None,
**kwargs,
):
Expand All @@ -202,6 +202,7 @@ async def _execute(
f"{agen} must be called with a `task_name` named "
f"argument with a falue from {tasks}")

topics = set(topics)
ss = current_actor().statespace
lockmap = ss.setdefault('_pubtask2lock', task2lock)
lock = lockmap[task_name]
Expand Down

0 comments on commit 36ec668

Please sign in to comment.