You will never need to use Boost or any external libraries for any multithreading in C++ for FRC, so save yourself some headaches and just WPILib because it works like a charm.
Here's some code that makes a separate thread to flip the state of a relay, which is spawned at TeleopInit, and killed off at DisabledInit.
Code:
class Robot: public SimpleRobot{
Task secondThread;
Relay *relay;
public:
Robot():
secondThread("SecondThread",(FUNCPTR) Robot::threadFunction)
{
relay=new Relay(1);
}
void threadFunction(UINT32 relayPointer){
Relay *rly=(Relay*)relayPointer;
while(true){
rly->Set(Relay::kForward);
Wait(1);
rly->Set(Relay::kReverse);
Wait(1);
}
}
void Disabled(){
secondThread.Stop();
}
void Teleop(){
secondThread.Start((UINT32) relay);
}
};
START_ROBOT_CLASS(Robot)
;
See also:
http://www.chiefdelphi.com/forums/sh...ad.php?t=82398
If you need explanation of anything in this post, just refer to that post^
__________________

2012 Head of Programming and Electrical
2013-14 Overall Team Captain and Programming Head
2012-14 Mentor of FLL Team Power Surge
2014 Dean's List Finalist
2014 CIR Xerox Creativity Award
Webpage