Opened 13 years ago

Last modified 21 months ago

#575 new enhancement

Mark "lightweight" functions/methods in API headers

Reported by: Olly Betts Owned by: Olly Betts
Priority: normal Milestone: 2.0.0
Component: Library API Version: git master
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description (last modified by Olly Betts)

In the Python bindings, we need to release the GIL (Global Interpreter Lock) while executing C++ functions/methods which can do significant work. We currently do this for all methods, which adds an unnecessary overhead.

In Liam's node.js wrappers, he wants to know which functions shouldn't block.

This would probably be useful for some other bindings too.

Both of these cases would be assisted by adding macro markers to the API headers for functions/methods which are "lightweight". For the Python bindings we could extract these to automatically generate a SWIG interface file to tell SWIG not to drop the GIL for these. And we could produce a list of the methods for human inspection for the node.js case.

Obvious candidates are the version functions and get_description() methods.

Change History (4)

comment:1 by Olly Betts, 13 years ago

Milestone: 1.3.01.3.x

comment:2 by Olly Betts, 13 years ago

Description: modified (diff)

comment:3 by Olly Betts, 9 years ago

Milestone: 1.3.x1.4.x

There are only markers to use when generating the bindings, so no ABI impact, hence not a 1.4.0 blocker.

comment:4 by Olly Betts, 21 months ago

Milestone: 1.4.x2.0.0
Version: SVN trunkgit master
Note: See TracTickets for help on using tickets.