diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/thread.c | 15 | ||||
| -rw-r--r-- | src/core/thread.h | 6 |
2 files changed, 0 insertions, 21 deletions
diff --git a/src/core/thread.c b/src/core/thread.c index 986ff331..f686612b 100644 --- a/src/core/thread.c +++ b/src/core/thread.c @@ -138,21 +138,6 @@ nni_thr_run(nni_thr *thr) } void -nni_thr_wait(nni_thr *thr) -{ - if (!thr->init) { - return; - } - nni_plat_mtx_lock(&thr->mtx); - thr->stop = 1; - nni_plat_cv_wake(&thr->cv); - while (!thr->done) { - nni_plat_cv_wait(&thr->cv); - } - nni_plat_mtx_unlock(&thr->mtx); -} - -void nni_thr_fini(nni_thr *thr) { if (!thr->init) { diff --git a/src/core/thread.h b/src/core/thread.h index 154b4616..316acdc2 100644 --- a/src/core/thread.h +++ b/src/core/thread.h @@ -76,12 +76,6 @@ extern void nni_thr_fini(nni_thr *thr); // nni_thr_run runs the given thread, which must have been initialized. extern void nni_thr_run(nni_thr *thr); -// nni_thr_wait waits for the thread to complete execution, but does not -// release resources associated with it. It is idempotent. If the this -// is called before nni_thr_run is called, then the thread will not run -// at all. -extern void nni_thr_wait(nni_thr *thr); - // nni_thr_is_self returns true if the caller is the named thread. extern bool nni_thr_is_self(nni_thr *thr); |
