Skip to content

Commit

Permalink
Add Windows Event loop policy
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelmassot committed Nov 12, 2023
1 parent 98485ab commit ba73802
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/zeroros/publisher.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import asyncio
import json
import time
import sys

import zmq

from zeroros.messages import Header, Message
from zeroros.topic import validate_topic


if sys.platform == 'win32':
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())


class Publisher:
def __init__(
self,
Expand Down
5 changes: 5 additions & 0 deletions src/zeroros/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import threading
import time
import sys

import zmq
import zmq.asyncio
Expand All @@ -10,6 +11,10 @@
from zeroros.topic import validate_topic


if sys.platform == 'win32':
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())


class Subscriber:
def __init__(
self,
Expand Down

0 comments on commit ba73802

Please sign in to comment.