TCP with preemtive slice workaround?

Hey guys,

I’m trying implement code that executes a piece of code at a 10Hz interval
accurately while leaving room to listen for incoming commands coming from a TCP
socket on a BL2000 series board.

The structure of my code is something like this:

costate {
start_time = TICK_TIMER;
waitfor(DelayTicks(100));
->execute 10Hz code;
}

time_left = 90 - (TICK_TIMER-start_time);

if (time_left>0) {
slice(500,(int)time_left) {
->listen and parse incoming command from TCP socket;
}
}

I found out a little too late that no TCP is allowed if you used slice. Why is
this so? Is there are way to work around this limitation? Any help would be much
appreciate thanks!