一:
1, Create 3 threads, and all threads will continuously write logs into the same log file under /tmp/.
2, Every thread writes a log after an *average* 2-second time interval.
3, Each log record includes:
A, a timestamp;
B, thread ID;
C, time past since last log from the same thread.
二:
1, Read keyboard input, X, and create X threads.
2, All threads will continuously write logs into the same log file under /tmp/.
3, Every thread writes a log after an *average* 2-second time interval.
4, Each log record includes: A, a timestamp; B, thread ID; C, time past since last log of the same thread.
5, After receiving 'Clt-C', all threads should exit immediate after printing a final log.
6, The last log record should also include the total numbers of logs the thread has printed.
「三年博客,如果觉得我的文章对您有用,请帮助本站成长」
共有 0 - 英文面试题