Is there something to replace the functions?

前端 未结 4 845
不思量自难忘°
不思量自难忘° 2020-12-05 07:47

The user thread functions in are deprecated because they use a deprecated C feature (they use a function declaration with empty parentheses f

4条回答
  •  粉色の甜心
    2020-12-05 08:16

    No, there is no standard replacement for them.

    You options are

    • continue to use even though they contain obsolete C.
    • switch to pthreads
    • write your own co-thread library
    • use an existing (and possibly not-so-portable) co-thread library such as http://swtch.com/libtask/ , though many of such libraries are implemented on top of ucontext.h

提交回复
热议问题