Source language: Translate to:

multithreading, revival inquiry, targets timer object

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

multithreading, revival inquiry, targets timer object

Postby Guest » Thu Dec 02, 2004 10:37 pm

ok, we had discussed multi threading from the pas. Still, this is a limitation I still found which could be very useful.

When I say multithreading, meaning there will be two or more process running independently. And that each threads may or may not care about other threads. like a parallel communication system.

For an example:
what about an independent timer object? it will wait for the user to start this object and then continously run until it is stopped by user and/or the publication is closed/terminated.
Guest
 

Postby Guest » Fri Dec 03, 2004 7:15 am

Hi reynoldlariza,

In what ways is the "independent timer object" different than Neobook's current timer object?

-- Sam
Guest
 

Postby Guest » Sat Dec 04, 2004 3:59 am

Sam Cox wrote:Hi reynoldlariza,

In what ways is the "independent timer object" different than Neobook's current timer object?

-- Sam


generally ( from what i have experienced) current neobook timer object is still run within the pubs thread, meaning the timer will not return until it completes its function.

A multithreaded/parallel timer object (which is i'm suggesting) will allow other subs/scripts from neobook eventhough the timer object is not yet completed its task or has not received a stop signal.
Guest
 

Postby Guest » Sat Dec 04, 2004 7:42 am

reynoldlariza:

... meaning the timer will not return until it completes its function.

A multithreaded/parallel timer object (which is i'm suggesting) will allow other subs/scripts from neobook eventhough the timer object is not yet completed its task or has not received a stop signal.
Not sure what you mean by "until it completes its function" ...

Say Timer1 has a 1 second interval ... if it runs for 60 seconds, user can still invoke script actions during the 60 seconds ... actions which will be "briefly interrupted" every second while NeoBook invokes the actions inside "Timer1's TimerInterval" section.

However, say your TimerInterval section has a command (perhaps a call to a plug-in that takes more than 1 second to return ) ... and if you are saying that the rest of NeoBook freezes until the plug-in returns control to the TimerInterval section code (I haven't tried it), could you get around this with the use of two Timer objects ? e.g.

In Timer1's TimerInterval section, you simply do a ...

TimerStart "Timer2" "100"

... and all Timer2 does is ...

TimerStop "Timer2"
SetVar "[rlVeryLongLastingCommandInProgress]" "True"
rlVeryLongLastingCommand "etc" "etc"

... depending on the design of your application ...

a) your plug-in command could (just before termination) reset the variable value to False or null
b) Timer1 could decide to invoke Timer2 only if the variable is not "True"


This way, Timer one keeps doing its thing every second ... and its TimerInterval does not hog the application's processing slice ... and when a long lasting command is required, it is parceled off to another (run once) Timer object (note: NeoBook v5 has a new RunOnce option for a Timer Object ... but I am not sure if it would work to solve your requirement ... since you want the Timer to stop before the actions in its TimerInterval are all processed).
Guest
 

Postby Tony Kroos » Wed Jun 01, 2011 12:58 pm

Can neobook have a "multi-threading support" (at least) in the future, please? timer objects maybe?

:cry:
listed since 2002...
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Postby Neosoft Support » Thu Jun 02, 2011 10:10 am

How do you see multi-threading being implemented within the context of NeoBook?

What would you do with "multi-threading" that you cannot do now?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby smartmedia » Thu Jun 02, 2011 11:25 am

Hi..

I have tried also in the past to run different parts of code using timers and i had problems with that. Multi-threading as far i know isolate the part of code you want to run and gives him different memory address and priority to CPU.
In any case, could be very useful if NB has this future.
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Tony Kroos » Tue Jun 07, 2011 8:35 am

Neosoft Support wrote:What would you do with "multi-threading" that you cannot do now?

oh... There are many cases when multithreading will save you a lot of time...
anyway, it will greatly increase overall performance and responce of neobook apps. And why not to implement such a feature when it can be easily done and make neobook looking little more professional and meet some modern requirements at last? There were no significant changes for the last 3-4 years, this is a very long time you know...
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Postby Tony Kroos » Tue Jun 07, 2011 8:44 am

Neosoft Support wrote:How do you see multi-threading being implemented within the context of NeoBook?

- timers or subroutines can be run in different threads (for ex. add another tab in Book Prop->Actions submenu for "multithreading" subs)
- a new main menu item with manual (visual) threads management where u can add a thread and assign the subroutines for selected threads.
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Postby TinTin » Tue Jun 07, 2011 9:28 am

Yes i would like to see this too.. it would certainly increase performance with Timers within Neobook...
TinTin
 
Posts: 162
Joined: Sun Dec 06, 2009 4:03 am
Location: UK

Postby Neosoft Support » Tue Jun 07, 2011 11:39 am

For those who don't know what multi-threading is, basically it involves the processor (CPU) switching between two or more different tasks or threads. This switching generally happens frequently enough that the user perceives the threads as running at the same time. With a multi-core processor, the threads actually can be programmed to run at the same time. However, the programming methods/code used to execute single processor and multi-processor threads are very different.

...And why not to implement such a feature when it can be easily done and make neobook looking little more professional and meet some modern requirements at last?


There are certainly instances when multi-threading can increase performance. However, I think you over-estimate how much of an impact it would have on the average NeoBook application. Also, I'm not sure what you mean when you say that "it can be easily done." Really?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Gaev » Tue Jun 07, 2011 1:17 pm

1) I see a lot of "general feel good" responses ...
Multi-threading as far i know isolate the part of code you want to run and gives him different memory address and priority to CPU.
In any case, could be very useful if NB has this future
- timers or subroutines can be run in different threads (for ex. add another tab in Book Prop->Actions submenu for "multithreading" subs)
- a new main menu item with manual (visual) threads management where u can add a thread and assign the subroutines for selected threads.
it would certainly increase performance with Timers within Neobook...

... but I don't see a direct example of real world functionality that answers Dave's question ...
What would you do with "multi-threading" that you cannot do now?

2) in addition, I wonder about the additional complexity introduced in having the different threads share the ...

a) flat memory model

b) screen space

... can the majority of NeoBook Developers handle such complexities ? ... and imagine trying to debug such an environment !!!

IMHO, there are a number of other areas where enhancements would benefit a large number of the NeoBook Developers ... and would take less time/effort from Dave.
User avatar
Gaev
 
Posts: 3735
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Tony Kroos » Wed Jun 08, 2011 4:03 am

Neosoft Support wrote:However, I think you over-estimate how much of an impact it would have on the average NeoBook application.

I must say that now I've been increasingly using vb.net instead of neobook due to lack of multithreading (btw, I hate to manage thousands lines of vb code), but... the more I use threads, the more I see where it is possible to use for...
Neosoft Support wrote:Also, I'm not sure what you mean when you say that "it can be easily done." Really?
well I guess it's not a "mission impossible" for neobook's creators, isn't it?))
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Postby Tony Kroos » Wed Jun 08, 2011 4:32 am

Gaev wrote:direct example of real world functionality

for example multiple http-requests management. app receives data from many http sources (some of them can be down), it takes some time to get all the data. In addition, data from each source have to be parsed in it's own way (using loops). It takes some noticeable time too, and when the job is run in step-by-step mode, it takes about 1-2 mins to complete (depends on computer's config), it is long time... then imagine that all the data have to be refreshed in a given period (1-5-10mins)... (((
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Postby Neosoft Support » Wed Jun 08, 2011 11:05 am

Adding a multi-threading option to NeoBook certainly isn't "impossible", but it would take quite a bit of time. I'm just not sure that multi-threading is a must have NeoBook feature.

I must say that now I've been increasingly using vb.net instead of neobook due to lack of multithreading (btw, I hate to manage thousands lines of vb code), but... the more I use threads, the more I see where it is possible to use for...


If you're experimenting with Visual Basic and multi-threading then you might find this article interesting:

http://msdn.microsoft.com/en-us/magazine/cc163929.aspx
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Next

Return to NeoBook Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest