I am in need to use some sort of thread-safe queue in micropython running on an ev3dev device.
I am trying by using the uasyncio module but although it seems to be recognizing the library correctly when I try to use the Queue I get strange behavior. Here is a sample of commands executed in an interactive micropython session:
MicroPython v1.9.4 on 2018-05-22; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> from uasyncio.queues import Queue
>>> q = Queue()
>>> q.put("Item1")
**<generator object 'put' at b6c0ae10>**
>>> q.get()
**<generator object 'get' at b6c0afa0>**
>>>
As you can see the put and get functions are not returning the expected values for what the documentation states. Any idea of what the problem might be? ADDED NOTE: I was expecting to get back the "Item1" with the call to the get() method. I am new to python and I am not sure how to deal with generators. DO I need to do something else to get the "Item1" that I placed in the queue?