1. two possible bugs in tasking


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

new topic     » topic index » view message » categorize

2. Re: two possible bugs in tasking

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".

new topic     » goto parent     » topic index » view message » categorize

3. Re: two possible bugs in tasking

CoJaBo2 said...

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

new topic     » goto parent     » topic index » view message » categorize

4. Re: two possible bugs in tasking

said...

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.

useless_ said...

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.

new topic     » goto parent     » topic index » view message » categorize

5. Re: two possible bugs in tasking

CoJaBo2 said...
said...

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.

useless_ said...

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.

CoJaBo2 said...

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

new topic     » goto parent     » topic index » view message » categorize

6. Re: two possible bugs in tasking

CoJaBo2 said...
said...

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.

CoJaBo2 said...
useless_ said...

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

new topic     » goto parent     » topic index » view message » categorize

7. Re: two possible bugs in tasking

Duplicate post deleted. The forum hung, i hit "submit" again, it instantly posted twice.

new topic     » goto parent     » topic index » view message » categorize

8. Re: two possible bugs in tasking

useless_ said...

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

new topic     » goto parent     » topic index » view message » categorize

9. Re: two possible bugs in tasking

I'm going to ask that a forum moderator look into censoring CoJaBo's use of swear words in this thread.

new topic     » goto parent     » topic index » view message » categorize

10. Re: two possible bugs in tasking

jimcbrown said...

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?

new topic     » goto parent     » topic index » view message » categorize

11. Re: two possible bugs in tasking

CoJaBo2 said...
jimcbrown said...

I'm going to ask that a forum moderator look into censoring CoJaBo's use of swear words in this thread.

.........Seriously?

Yes. Seriously.

CoJaBo2 said...

Has there ever been a time I've sworn in the forums?

No. (At least, none that I can recall.)

CoJaBo2 said...

Outside of that one quote of someone else?

That one quote is enough. You put that word into this thread.

new topic     » goto parent     » topic index » view message » categorize

12. Re: two possible bugs in tasking

jimcbrown said...
CoJaBo2 said...
jimcbrown said...

I'm going to ask that a forum moderator look into censoring CoJaBo's use of swear words in this thread.

.........Seriously?

Yes. Seriously.

CoJaBo2 said...

Has there ever been a time I've sworn in the forums?

No. (At least, none that I can recall.)

CoJaBo2 said...

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.

new topic     » goto parent     » topic index » view message » categorize

13. Re: two possible bugs in tasking

mattlewis said...
useless_ said...

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

new topic     » goto parent     » topic index » view message » categorize

14. Re: two possible bugs in tasking

useless_ said...

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

new topic     » goto parent     » topic index » view message » categorize

15. Re: two possible bugs in tasking

mattlewis said...
useless_ said...

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.

mattlewis said...

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

new topic     » goto parent     » topic index » view message » categorize

16. Re: two possible bugs in tasking

CoJaBo2 said...

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). smile

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?

new topic     » goto parent     » topic index » view message » categorize

17. Re: two possible bugs in tasking

euphoric said...
CoJaBo2 said...

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). smile

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

new topic     » goto parent     » topic index » view message » categorize

18. Re: two possible bugs in tasking

euphoric said...
CoJaBo2 said...

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). smile

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.

euphoric said...

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.

euphoric said...

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.

new topic     » goto parent     » topic index » view message » categorize

19. Re: two possible bugs in tasking

useless_ said...
euphoric said...

...kat wrote "sh!t" to no complaints (but I helpfully censored). smile

Thing is, i did not write it in this forum.

useless

Uh... in the message you wrote above, I quote:

useless said...

...it was like rubbing my nose in your shit...

You did write that in this forum.

new topic     » goto parent     » topic index » view message » categorize

20. Re: two possible bugs in tasking

jimcbrown said...
euphoric said...
CoJaBo2 said...

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). smile

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.

jimcbrown said...
euphoric said...

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*

new topic     » goto parent     » topic index » view message » categorize

21. Re: two possible bugs in tasking

euphoric said...
eukat said...
euphoric said...

...kat wrote "sh!t" to no complaints (but I helpfully censored). smile

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.

new topic     » goto parent     » topic index » view message » categorize

22. Re: two possible bugs in tasking

euphoric said...
jimcbrown said...
euphoric said...
CoJaBo2 said...

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). smile

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.

euphoric said...

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.

euphoric said...
jimcbrown said...
euphoric said...

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.

new topic     » goto parent     » topic index » view message » categorize

23. Re: two possible bugs in tasking

euphoric said...
useless_ said...
euphoric said...

...kat wrote "sh!t" to no complaints (but I helpfully censored). smile

Thing is, i did not write it in this forum.

useless

Uh... in the message you wrote above, I quote:

useless said...

...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

new topic     » goto parent     » topic index » view message » categorize

24. Re: two possible bugs in tasking

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

new topic     » goto parent     » topic index » view message » categorize

25. Re: two possible bugs in tasking

mattlewis said...

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.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu