This may or may not be of interest to you, but you can use threading in intel's Arduino IDE. I am doing this with one of my robotics programs. It kinda makes up for the fact that the Edison isn't really a realtime device at the moment.
example...
void *blinkAnLED(void *) {
while (1) {
digitalWrite(13,HIGH);
delay(500);
digitalWrite(13,LOW);
delay(500);
}
}
setup() {
pthread_t ledBlinker;
pthread_create(&ledBlinker, NULL, blinkAnLED, NULL);
}
loop() {
doOtherStuff();
}