View Single Post
  #2   Spotlight this post!  
Unread 10-08-2009, 12:30
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,055
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Multithreaded programs

My WebDMA project uses multithreading to run the web server on a background thread on the cRIO.

Look at the Task object for easy to use multithreading with objects. It uses the native vxWorks thread API to allow you to create multiple tasks and set their priorities and such.

If you're familiar with pthreads, vxWorks has a pthreads API that you can use, which is just a wrapper around the native API.

I used the multi-platform boost::thread library with WebDMA, which uses pthreads as the underlying native thread API. Some of my boost patches made it into 1.39, so you might not need to patch it anymore -- I haven't tried 1.39 yet.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote