Hey, I was just wondering whether it is possible to do multiple tasks in a console application at the same time. Like lets say if a program reads user's input and displays output at the same time, can the program carry on displaying output while it waits for user's input at the same time?

Just wondering if this can be done using the core language itself and if you could name this mechanism as well please. Thanks.

Well, i guess you can use threads. But you might have to make sure you make them synchronized. i have never tried doing it, but i guess you can, using threads.

@daviddoria

haha, speaking of thread synchronization, we both posted at almost the same time. Oops, sorry about that.

Haha, we needed a mutex (or one of those other words I don't really understand... :) )

LOL, yeah :)

Thanks for the replies :). I don't really want to use them myself, was asking out of curiosity :P
Are they a common thing to use in large programs?

Definitely. Threads are absolutely how you do multiple things at the same time.

Ok, thank you both for replying :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.