| 15 | } |
| 16 | |
| 17 | PyObject* |
| 18 | sleep10(PyObject*, PyObject*) |
| 19 | { |
| 20 | pthread_t thread; |
| 21 | int ret = pthread_create(&thread, NULL, &sleepThread, NULL); |
| 22 | assert(0 == ret); |
| 23 | |
| 24 | Py_BEGIN_ALLOW_THREADS ret = pthread_join(thread, NULL); |
| 25 | Py_END_ALLOW_THREADS |
| 26 | |
| 27 | assert(0 == ret); |
| 28 | Py_RETURN_NONE; |
| 29 | } |
| 30 | |
| 31 | static PyMethodDef methods[] = { |
| 32 | {"sleep10", sleep10, METH_NOARGS, "Sleep for 10 seconds"}, |
nothing calls this directly
no outgoing calls
no test coverage detected