Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src
> On Dec 26, 2018, at 5:25 PM, Jason Thorpe <thorpej%me.com@localhost> wrote:
>
> I think this the way to go. I’ll look at it a little later tonight.
>
> -- thorpej
> Sent from my iPhone.
>
>> On Dec 26, 2018, at 4:11 PM, Taylor R Campbell <campbell+netbsd-source-changes-d%mumble.net@localhost> wrote:
>>
>> 2. Chuck the job reference count altogether. Just use job_thread as a
>> proxy for whether it's in use. User must not call
>> threadpool_schedule_job concurrently with threadpool_job_destroy;
>> if a job may have been scheduled, user must cancel it before
>> destroying it.
To elaborate -- this is the same requirement in the task(9) API -- In fact, my unit test tripped over this requirement by virtue of using implicit-task-done, and so the safe thing to do is always cancel before destroying unless you're doing extra bookkeeping in the caller where you're using other means to ensure jobs / tasks are complete.
-- thorpej
Home |
Main Index |
Thread Index |
Old Index