31576

How to call a multi-threaded C function in Cython?

Question:

I have a question about how to call a multi-threaded C function in Cython.

Do I need to release/acquire the GIL before/after I do the multi-threaded stuff in the C function?

Or can I just use it like a normal C function?

Should I follow the directions <a href="http://docs.python.org/c-api/init.html#thread-state-and-the-global-interpreter-lock" rel="nofollow">here</a> for general Python extensions?

Answer1:

You should have looked down a few sections.

<a href="http://docs.python.org/c-api/init.html#non-python-created-threads" rel="nofollow">http://docs.python.org/c-api/init.html#non-python-created-threads</a>

Recommend

  • Adding images to StackPanel in WPF
  • jquery- How to automatically insert colon after entering 2 numeric digits
  • Insert char to string to end of number
  • breeze: behavior of setDeleted
  • How to detect the item restore on a ItemAdded() event on SharePoint
  • Touchmove with Phonegap
  • Limit the amount of rows in a room database
  • no definition for dispatcher
  • Unable to find meaningful logs for ReactNative using Crashlytics
  • How to get list of all user CA certificates installed in an Android Device?
  • Html Multiple Input Elements With Same Name
  • Human readable URL Scheme for ASP.NET MVC
  • Retrieving saved checkboxes' name and values from database
  • How to Include CSS style when converting svg to png
  • Is there a way to convert all existing table data to UTF8 collation?
  • iOS Today Extension created as .app rather than .appex
  • CSV processing in Hadoop
  • how to add Image in JPanel
  • How to manipulate content of a comment with Apache POI
  • Force fading edge on TextView
  • Backbone - Create Multiple Models in Collection - serverside
  • what do lines starting with double-slash '//' mean in a .npmrc?
  • How to search for a method or variable name within android project?
  • Why am I getting an Argument exception when creating event handler dynamically?
  • Smarter Removing Unnecessary WhiteSpace CSV
  • Write to elasticsearch from spark is very slow
  • Autocomplete source from project settings
  • How to use AJAX to upload large CSV file? [closed]
  • Stop an element moving with padding on hover
  • Typeahead.js does give me suggestions but doesn't select them
  • Cloud Code: Creating a Parse.File from URL
  • Why isn't stemDocument stemming?
  • Debug `Unexpected end of JSON input Error` on content script
  • Bad automatic Triangulation with Mayavi for coloring a surface known only by its corner
  • Using Service Component Runtime
  • How to handle a codeigniter PDF generator