We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有些场景,在butex_wake*的时候不希望被唤醒的bthread和现在的bthread马上交换并投入执行,比如,execution_queue是一个多生产者单消费者的队列,多生产者生成任务然后等待消费者将任务处理完成(比如:调用CountdownEvent::wait),消费者处理完任务唤醒生产者(比如:调用CountdownEvent::wait),在此过程中会频繁的触发协程的exchange。 需求:因为消费者是单线程,往往是性能的瓶颈点,需要最快的完成任务,如果消费者在处理完每个任务,只将消费者投入运行队列,并且能批量执行signal,这样性能应该会好很多。
The text was updated successfully, but these errors were encountered:
你是希望提供类似butex_wake_urgent/butex_wake_background这样的函数吗?
Sorry, something went wrong.
是的,类似这样的功能,我现在改了一下 int butex_wake_all(void* arg, bool nodelay),加个了参数,如果nodelay = false就统一走ready_to_run_general,不走下边的TaskGroup::exchange。 但是这个改动不一定优雅,可能需要你们的综合设计。
可以提个PR看看
No branches or pull requests
有些场景,在butex_wake*的时候不希望被唤醒的bthread和现在的bthread马上交换并投入执行,比如,execution_queue是一个多生产者单消费者的队列,多生产者生成任务然后等待消费者将任务处理完成(比如:调用CountdownEvent::wait),消费者处理完任务唤醒生产者(比如:调用CountdownEvent::wait),在此过程中会频繁的触发协程的exchange。
需求:因为消费者是单线程,往往是性能的瓶颈点,需要最快的完成任务,如果消费者在处理完每个任务,只将消费者投入运行队列,并且能批量执行signal,这样性能应该会好很多。
The text was updated successfully, but these errors were encountered: