Author: Maciej Fijalkowski <[email protected]>
Branch: 
Changeset: r69464:62604e2af5d2
Date: 2014-02-26 16:30 +0200
http://bitbucket.org/pypy/pypy/changeset/62604e2af5d2/

Log:    update this example

diff --git a/pypy/doc/embedding.rst b/pypy/doc/embedding.rst
--- a/pypy/doc/embedding.rst
+++ b/pypy/doc/embedding.rst
@@ -14,15 +14,12 @@
 to make a full API working, provided you'll follow a few principles. The API
 is:
 
-.. function:: void rpython_startup_code(void);
+.. function:: void pypy_init(int need_threads);
 
    This is a function that you have to call (once) before calling anything.
    It initializes the RPython/PyPy GC and does a bunch of necessary startup
-   code. This function cannot fail.
-
-.. function:: void pypy_init_threads(void);
-
-   Initialize threads. Only need to be called if there are any threads involved
+   code. This function cannot fail. Pass 1 in case you need thread support, 0
+   otherwise.
 
 .. function:: long pypy_setup_home(char* home, int verbose);
 
@@ -49,7 +46,7 @@
    In case your application uses threads that are initialized outside of PyPy,
    you need to call this function to tell the PyPy GC to track this thread.
    Note that this function is not thread-safe itself, so you need to guard it
-   with a mutex.
+   with a mutex. Do not call it from the main thread.
 
 Simple example
 --------------
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to