team178 / TheClaaaw

2015 Competition Robot - Recycle Rush
1 stars 0 forks source link

Fix threads #1

Closed robstolarz closed 9 years ago

robstolarz commented 9 years ago

So in ActionHelper.java you'll notice that it starts a new thread that loops over everything for just one Action

Take that part of the code out of the constructor and move it to a single statically initialized thread in this static initializer code block, have each ActionHelper add itself to this ArrayList and then have that thread loop over every item in the ArrayList, calling the appropriate methods as shown in the first link of this issue.

That way you only have one Thread doing everything, which means the horrid wonderful Java/NI scheduler won't mess everything up

robstolarz commented 9 years ago

Fixed: we're using an imperative Timer based autonomous.