Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Suggestion: Unlock the GIL while accessing uqueue.Queue get() und put() functions

    Scheduled Pinned Locked Moved Enhancements
    gilqueue
    3 Posts 2 Posters 928 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      Sympatron
      last edited by

      At the moment the GIL is not unlocked while sending to or receiving from a queue.
      This has the effect that a call to get() while the queue is empty results in an immediate deadlock and the same goes for put() if the queue is full.

      If the GIL was unlocked other parts of the application would still be able to run and the only change required would be to wrap the calls to xQueueSend/xQueueReceive with MP_THREAD_GIL_EXIT and MP_THREAD_GIL_ENTER calls in moduqueue.c.

      1 Reply Last reply Reply Quote 0
      • sebS Offline
        seb
        last edited by

        Can you submit this as an issue on the firmwares github please: https://github.com/pycom/pycom-micropython-sigfox

        1 Reply Last reply Reply Quote 0
        • S Offline
          Sympatron
          last edited by Sympatron

          I sent a pull request: https://github.com/pycom/pycom-micropython-sigfox/pull/146

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post

          Pycom on Twitter

          Pycom