[Win32utils-devel] Pointer bug in win32-taskscheduler?
phasis at gmail.com
Sun Jan 13 01:12:50 EST 2008
2008/1/13, Daniel Berger <djberg96 at gmail.com>:
> Hi all,
> I thought this was strange:
> ts = TaskScheduler.new
> ts.new_work_item('foo', trigger)
> p ts.status
> p ts.status # null pointer (ts_get_status)
> I noticed that in the ts_save function in taskscheduler.c we're doing
> this at line 278:
> ptr->pITask = NULL;
> At first I thought this was a mistake but it looks like it's required.
The active task can be chchecked with ptr->pITask.
I think part of what's confusing me is that we're not encapsulating work
> items separately and that TaskScheduler#status only checks the currently
> active task. Maybe a separate TaskScheduler::Task class would be a good
> idea, though it would mean more work.
There are two categoris in TaskScheduler. Create a Task and Modify a Task.
I think seperating two job is more reasonable.
It might be helpful to refer Perl's approach.
> win32utils-devel mailing list
> win32utils-devel at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the win32utils-devel