1. two possible bugs in tasking
- Posted by useless_ Sep 19, 2012
- 1562 views
I uploaded two files:
http://designerthinking.com/OpenEuphoria/taskbug_1.ex
http://designerthinking.com/OpenEuphoria/taskbug_2.ex
(and i uploaded titlebar.e in the same dir if you don't have that)
The taskbugs are based on news.ex and are the same except for one change: the method of attempting to stop the search_url() tasks.
Taskbug_1.ex creates a task setquit() and tells it to fire in 8 seconds, and it does, and it calls task_suspend on every search_url() task ID stored in sequence searchtasks. But the tasks are not killed, and yeas, there are task_yields after that. It just keeps on running, but displaying nothing from the search_url() tasks.
Taskbug_2.ex calls setquit() like a normal procedure. But same results, no tasks are killed. The while loop that starts at line 266 keeps on looping.
What is going on in the task manager with these? What i expect to happen in both taskbug.ex's is the program exits the while loop at line 276 and then runs like an non-tasked code body.
useless
2. Re: two possible bugs in tasking
- Posted by CoJaBo2 Sep 19, 2012
- 1524 views
Double-check the task_schedule docs- the second parameter is an adjustment to the scheduler "burst" frequency, not a timeout. You are passing it a huge integer, which essentially tells it "run this same task this number of times before running any other task".
3. Re: two possible bugs in tasking
- Posted by useless_ Sep 19, 2012
- 1519 views
Double-check the task_schedule docs- the second parameter is an adjustment to the scheduler "burst" frequency, not a timeout. You are passing it a huge integer, which essentially tells it "run this same task this number of times before running any other task".
And what does that haveto do with the task_suspend() not working?
useless
4. Re: two possible bugs in tasking
- Posted by CoJaBo2 Sep 19, 2012
- 1518 views
02:29 * katsmeow-afk wonders why the fuck CoJaBo isn't tlaking in here in real time, but instead is talking thru the forum, and not giving up enouh info
Because you posted the question in the forums, and because almost no one uses the IRC channel.
And what does that haveto do with the task_suspend() not working?
Not sure. I only pointed out the issue I saw that seemed like it would cause exactly the behavior you described. Does said behavior change in any way when you correct that param?
I'm not really inclined to help further if you're going to be so fricking hostile, every single time you have an issue, at the first thing you perceive as a mis-step.
5. Re: two possible bugs in tasking
- Posted by useless_ Sep 19, 2012
- 1525 views
02:29 * katsmeow-afk wonders why the fuck CoJaBo isn't tlaking in here in real time, but instead is talking thru the forum, and not giving up enouh info
Because you posted the question in the forums, and because almost no one uses the IRC channel.
And what does that haveto do with the task_suspend() not working?
Not sure. I only pointed out the issue I saw that seemed like it would cause exactly the behavior you described. Does said behavior change in any way when you correct that param?
I changed to
task_schedule(t,{timeout,timeout+1}) -- schedule it to run in timeout seconds
and got no improvement.
I'm not really inclined to help further if you're going to be so fricking hostile, every single time you have an issue, at the first thing you perceive as a mis-step.
I was trying to discuss it in irc channel where you obviously are monitoring, and you would not discuss it until the minute i post to the forum pages.
useless
6. Re: two possible bugs in tasking
- Posted by useless_ Sep 19, 2012
- 1513 views
02:29 * katsmeow-afk wonders why the fuck CoJaBo isn't tlaking in here in real time, but instead is talking thru the forum, and not giving up enouh info
Because you posted the question in the forums, and because almost no one uses the IRC channel.
That is a great reason to not use the telephone, when i am talking to someone on it, no one else ever joins in.
And what does that haveto do with the task_suspend() not working?
Not sure. I only pointed out the issue I saw that seemed like it would cause exactly the behavior you described. Does said behavior change in any way when you correct that param?
I'm not really inclined to help further if you're going to be so fricking hostile, every single time you have an issue, at the first thing you perceive as a mis-step.
If your point was to show me having a short fuse, i'll gladly stipulate it's getting shorter and shorter as the years go by. However, I was in irc channel for 3 hours with you, trying to resolve this problem. Ignoring me so i'd bring it to this http forum, and then replying in a useless way, was not only not helpful, it was like rubbing my nose in your poopie, showing us all you were there ignoring me and can copy/paste from irc, while NOT helping here, NOT speaking to the point of my post! Yes, me and my short fuse will address that.
useless
7. Re: two possible bugs in tasking
- Posted by useless_ Sep 19, 2012
- 1500 views
Duplicate post deleted. The forum hung, i hit "submit" again, it instantly posted twice.
8. Re: two possible bugs in tasking
- Posted by mattlewis (admin) Sep 19, 2012
- 1472 views
What is going on in the task manager with these? What i expect to happen in both taskbug.ex's is the program exits the while loop at line 276 and then runs like an non-tasked code body.
The problem is that you are only suspending the tasks. I don't believe that there is a way to kill a task. Try adding this function (or something like it):
function task_list() sequence all_tasks = eu:task_list() sequence active_tasks = {} for i = 1 to length( all_tasks ) do if task_status( all_tasks[i] ) = 1 then active_tasks &= all_tasks[i] end if end for return active_tasks end function
What you're really interested in is if there are any active tasks. Just suspending a task does not remove it from the list of tasks as reported by task_list(). Perhaps we could add an optional parameter to filter the task list.
Matt
9. Re: two possible bugs in tasking
- Posted by jimcbrown (admin) Sep 19, 2012
- 1501 views
I'm going to ask that a forum moderator look into censoring CoJaBo's use of swear words in this thread.
10. Re: two possible bugs in tasking
- Posted by CoJaBo2 Sep 19, 2012
- 1459 views
I'm going to ask that a forum moderator look into censoring CoJaBo's use of swear words in this thread.
.........Seriously? Has there ever been a time I've sworn in the forums? Outside of that one quote of someone else?
11. Re: two possible bugs in tasking
- Posted by jimcbrown (admin) Sep 19, 2012
- 1463 views
I'm going to ask that a forum moderator look into censoring CoJaBo's use of swear words in this thread.
.........Seriously?
Yes. Seriously.
Has there ever been a time I've sworn in the forums?
No. (At least, none that I can recall.)
Outside of that one quote of someone else?
That one quote is enough. You put that word into this thread.
12. Re: two possible bugs in tasking
- Posted by CoJaBo2 Sep 19, 2012
- 1470 views
I'm going to ask that a forum moderator look into censoring CoJaBo's use of swear words in this thread.
.........Seriously?
Yes. Seriously.
Has there ever been a time I've sworn in the forums?
No. (At least, none that I can recall.)
Outside of that one quote of someone else?
That one quote is enough. You put that word into this thread.
I find this quite absurd. I'm out.
13. Re: two possible bugs in tasking
- Posted by useless_ Sep 19, 2012
- 1447 views
What is going on in the task manager with these? What i expect to happen in both taskbug.ex's is the program exits the while loop at line 276 and then runs like an non-tasked code body.
The problem is that you are only suspending the tasks. I don't believe that there is a way to kill a task. Try adding this function (or something like it):
function task_list() sequence all_tasks = eu:task_list() sequence active_tasks = {} for i = 1 to length( all_tasks ) do if task_status( all_tasks[i] ) = 1 then active_tasks &= all_tasks[i] end if end for return active_tasks end function
What you're really interested in is if there are any active tasks. Just suspending a task does not remove it from the list of tasks as reported by task_list(). Perhaps we could add an optional parameter to filter the task list.
Matt
That answers the other unanswered question too: can the task manager run out of task ID numbers? If a task stops running via task_suspend, it's ID can't be reused.
useless
14. Re: two possible bugs in tasking
- Posted by mattlewis (admin) Sep 19, 2012
- 1411 views
That answers the other unanswered question too: can the task manager run out of task ID numbers? If a task stops running via task_suspend, it's ID can't be reused.
Correct. Those don't get recycled, and the memory they consume (the basic overhead of the control structure and the execution stack, etc) isn't released either. I suspect you'd run out of memory before you ran out of task ids, though I haven't tested this.
Matt
15. Re: two possible bugs in tasking
- Posted by useless_ Sep 19, 2012
- 1401 views
What is going on in the task manager with these? What i expect to happen in both taskbug.ex's is the program exits the while loop at line 276 and then runs like an non-tasked code body.
The problem is that you are only suspending the tasks. I don't believe that there is a way to kill a task. Try adding this function (or something like it):
function task_list() sequence all_tasks = eu:task_list() sequence active_tasks = {} for i = 1 to length( all_tasks ) do if task_status( all_tasks[i] ) = 1 then active_tasks &= all_tasks[i] end if end for return active_tasks end function
That's a drop-in fix for what i was trying to do, thanks, Matt.
What you're really interested in is if there are any active tasks. Just suspending a task does not remove it from the list of tasks as reported by task_list(). Perhaps we could add an optional parameter to filter the task list.
Matt
That would be good. I had also considered a linked list so a task(s) could be found by name or wildmatch, such as
sequence these_tasks = task_list({"name","search_url*"}) sequence these_tasks = task_list({"parms,active","*yahoo*"}) sequence these_tasks = task_list({"parms,inactive","*cow*"})
Just some thoughts, maybe too wordy. Improve as needed.
useless
16. Re: two possible bugs in tasking
- Posted by euphoric (admin) Sep 20, 2012
- 1382 views
I find this quite absurd. I'm out.
Yeah, I thought that was weird, since kat wrote "sh!t" to no complaints (but I helpfully censored).
While I would prefer a cuss-word-free forum, I would prefer offenses be dealt with privately. Besides, Jim, you could have just censored it yourself, right?
17. Re: two possible bugs in tasking
- Posted by useless_ Sep 20, 2012
- 1359 views
I find this quite absurd. I'm out.
Yeah, I thought that was weird, since kat wrote "sh!t" to no complaints (but I helpfully censored).
While I would prefer a cuss-word-free forum, I would prefer offenses be dealt with privately. Besides, Jim, you could have just censored it yourself, right?
Thing is, i did not write it in this forum.
useless
18. Re: two possible bugs in tasking
- Posted by jimcbrown (admin) Sep 21, 2012
- 1311 views
I find this quite absurd. I'm out.
Yeah, I thought that was weird, since kat wrote "sh!t" to no complaints (but I helpfully censored).
CoJaBo brought it to the forum. Kat quoted it afterwards, but that might have been an automatic thing, whereas CoJaBo had to deliberately copy-and-paste the word in here from IRC.
Additionally, I believe forum offenses should be dealt with either on the forum or privately and offenses in the IRC channel should be handled in the channel.
While I would prefer a cuss-word-free forum, I would prefer offenses be dealt with privately.
This works for me as well. All I was asking was that the swear words be edited out. I wasn't asking for CoJaBo to be reprimanded.
Besides, Jim, you could have just censored it yourself, right?
True, but I try really hard not to take on the role of a moderator.
19. Re: two possible bugs in tasking
- Posted by euphoric (admin) Sep 21, 2012
- 1269 views
...kat wrote "sh!t" to no complaints (but I helpfully censored).
Thing is, i did not write it in this forum.
useless
Uh... in the message you wrote above, I quote:
...it was like rubbing my nose in your shit...
You did write that in this forum.
20. Re: two possible bugs in tasking
- Posted by euphoric (admin) Sep 21, 2012
- 1267 views
I find this quite absurd. I'm out.
Yeah, I thought that was weird, since kat wrote "sh!t" to no complaints (but I helpfully censored).
CoJaBo brought it to the forum. Kat quoted it afterwards, but that might have been an automatic thing, whereas CoJaBo had to deliberately copy-and-paste the word in here from IRC.
Am I missing something here? Kat wrote the word "shit" in her post (which I've changed to the far more politically correct "poopie"). It wasn't a quote. I'm guessing CoJaBo wrote the f-word at some point, which somebody changed to "fricking."
Maybe I just need to go grab some lunch.
Besides, Jim, you could have just censored it yourself, right?
True, but I try really hard not to take on the role of a moderator.
Ah. OK. Well, 1) I think it can be done anonymously. 2) Let me know in the future and I'll deal with it. *Grabs soap*
21. Re: two possible bugs in tasking
- Posted by jimcbrown (admin) Sep 21, 2012
- 1260 views
...kat wrote "sh!t" to no complaints (but I helpfully censored).
Thing is, i did not write it in this forum.
Uh... in the message you wrote above, I quote:
<snip>
You did write that in this forum.
Really? The closest I can find uses the word poopie.
22. Re: two possible bugs in tasking
- Posted by jimcbrown (admin) Sep 21, 2012
- 1263 views
I find this quite absurd. I'm out.
Yeah, I thought that was weird, since kat wrote "sh!t" to no complaints (but I helpfully censored).
CoJaBo brought it to the forum. Kat quoted it afterwards, but that might have been an automatic thing, whereas CoJaBo had to deliberately copy-and-paste the word in here from IRC.
Am I missing something here? Kat wrote the word "shit" in her post (which I've changed to the far more politically correct "poopie"). It wasn't a quote.
Oh. I missed that. Thanks for fixing it, though.
I'm guessing CoJaBo wrote the f-word at some point, which somebody changed to "fricking."
Maybe I just need to go grab some lunch.
If he did, I didn't see it.
Besides, Jim, you could have just censored it yourself, right?
True, but I try really hard not to take on the role of a moderator.
Ah. OK. Well, 1) I think it can be done anonymously. 2) Let me know in the future and I'll deal with it. *Grabs soap*
1) Sure, but I'd still be putting on that mantle. Not sure I want to.
2) Excellent! I'll be sure to make use of this in the future.
23. Re: two possible bugs in tasking
- Posted by useless_ Sep 21, 2012
- 1244 views
...kat wrote "sh!t" to no complaints (but I helpfully censored).
Thing is, i did not write it in this forum.
useless
Uh... in the message you wrote above, I quote:
...it was like rubbing my nose in your shit...
You did write that in this forum.
Ah, please excuse, i thought you meant the other line from irc.
If only there was this much communication about the topic, instead of communication about the communication.... umm, like you and cojabo both posting quotes containing words you don't want to see here. Should i post the line i thought you were talking about, containing more words you don't want to see?
useless
24. Re: two possible bugs in tasking
- Posted by mattlewis (admin) Sep 21, 2012
- 1254 views
Let's all please stop the meta conversation. Personally, I'd rather see lots of expletive laced posts about euphoria than this navel gazing.
Matt
25. Re: two possible bugs in tasking
- Posted by DerekParnell (admin) Sep 22, 2012
- 1230 views
Let's all please stop the meta conversation. Personally, I'd rather see lots of expletive laced posts about euphoria than this navel gazing.
Yeah ... wat he sed.