1 Jan 03:37
Re: v1.67 version of my job implementation
April White <april_white <at> sympatico.ca>
2006-01-01 02:37:43 GMT
2006-01-01 02:37:43 GMT
Neil Hodgson wrote: >>It is fixed; I decided to upload todays revisions under the same name as >>above. >> >> > OK. There are some threading worries. jobQueue.CurrentJob() returns >a pointer to a single job object which could potentially be deleted >while the pointer is being used even though currently this may be >safe. Since nothing is written into this pointer, you could make the >pointers const and also hand out a copy to ensure it can be used >without worrying about deletion. > > > I think I'll revise things again(Continue reading)I'll remove 'CurrentJob()' and add 'CurrentJobFlags()' and 'CurrentJobBufferPath()' The two would be initialized within the CanExecute() code, returning copies of the respective values. I'll play with it while I'm waiting for New Years to arrive... > JobQueue::CurrentJobDirectory has a small vulnerability since it >doesn't lock and copying a FilePath involves allocations. > > I was about to say you were worrying to much, because the internal variable is only assigned within GetNextJob(), but I recalled that it is
I'll remove 'CurrentJob()' and add 'CurrentJobFlags()' and
'CurrentJobBufferPath()'
The two would be initialized within the CanExecute() code, returning
copies of the respective values.
I'll play with it while I'm waiting for New Years to arrive...
> JobQueue::CurrentJobDirectory has a small vulnerability since it
>doesn't lock and copying a FilePath involves allocations.
>
>
I was about to say you were worrying to much, because the internal
variable is only assigned within GetNextJob(), but I recalled that it is
RSS Feed