jash-kothari-forks / libtorrent

Automatically exported from code.google.com/p/libtorrent
Other
0 stars 0 forks source link

Allow custom file storage backends to be written in $BINDING #428

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As far as I can tell, the current implementation allows for custom file storage 
backends[1] to be only written in C++. It would be nice however if one could 
write such backends in whatever binding language one is developing a client, 
eg. python.

[1] 
http://www.rasterbar.com/products/libtorrent/features.html#customizable-file-sto
rage

Original issue reported on code.google.com by moralezs...@gmail.com on 4 Mar 2013 at 1:09

GoogleCodeExporter commented 9 years ago
it's very hard to do this because of the GIL. The storage functions are run in 
a separate thread, different from python's thread, and it would have to call 
python functions, and thus lock the GIL first. It's not impossible to make it 
work, but it wouldn't come naturally in boost.python as far as I know.

Original comment by arvid.no...@gmail.com on 7 Sep 2013 at 9:18