Hi, I was wondering if there is any way of either breaking from or passing values to cin to get it to stop blocking. I have two threads, one blocking all the time and waiting for user input and the other acting on that input.
Thread 1:
[CODE=cpp]while() {
if(getline(std: :cin, sTemp)) {
... // push event
}
}[/CODE]
Thread 2:
[CODE=cpp]while() {
if(pollEvent(&e )) {
switch(e.type) {
case 1:
// somehow send something to cin or make it stop blocking
}
}[/CODE]
Thank-you!
Thread 1:
[CODE=cpp]while() {
if(getline(std: :cin, sTemp)) {
... // push event
}
}[/CODE]
Thread 2:
[CODE=cpp]while() {
if(pollEvent(&e )) {
switch(e.type) {
case 1:
// somehow send something to cin or make it stop blocking
}
}[/CODE]
Thank-you!
Comment