Go to Post This [Coach badge] means no-touchy the controllers. Even to save them from certain doom. - Kevin Sevcik [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #11   Spotlight this post!  
Unread 08-01-2014, 11:31
omalleyj omalleyj is offline
Registered User
AKA: Jim O'Malley
FRC #1279 (Cold Fusion)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: New Jersey
Posts: 132
omalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to behold
Re: How to make timed sequences in java?

Quote:
Originally Posted by Ether View Post
Do you think it's less efficient than time-slicing a separate thread?


Hard to say without looking in detail. You have the constant tests for setting and checking vs. the context switch to handle the thread. If the piston is used exactly once and never again the thread could be deleted. If its used many times the context switching could become onerous.
There are also many opportunuties to do threads badly. For instance if it was coded to check the time constantly rather than sleeping the whole duration it would be enormously worse. For teams that need to ask how to wait for something polling probably has the fewer pitfalls.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:47.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi