I've got a library written in C++ which I wrap using SWIG and use in python. Generally there is one class with few methods. The problem is that calling these methods may be time consuming - they may hang my application (GIL is not released when calling these methods). So my question is: 
What is the simplest way to release GIL for these method calls? 
(I understand that if I used a C library I could wrap this with some additional C code, but here I use C++ and classes)
You can use the same API call as for C. No difference. Include "python.h" and call the appoproate function.
Also, see if SWIG doesn't have a typemap or something to indicate that the GIL shuold not be held for a specific function.
Releasing Python GIL while in C++ code