gramaziokohler / roslibpy

Python ROS Bridge library
MIT License
273 stars 56 forks source link

use callFromThread #84

Closed beverlylytle closed 3 years ago

beverlylytle commented 3 years ago

All of the Twisted API needs to be called from the thread running the reactor. If not, weird blocking issues may occur. These blocking issues are made apparent when running multiple calls that use compas.await_callback (or really anything that has a callback which invokes event.set and waiting on that event in what may or may not be another thread) in cpython on mac.

What type of change is this?

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

gonzalocasas commented 3 years ago

LGTM! Also tested on Windows.