write file unwait (#4099)

This commit is contained in:
adamni135 2019-12-24 18:41:45 +08:00 committed by 吴晟 Wu Sheng
parent d7f7799c80
commit 9dcd3c74de
1 changed files with 2 additions and 6 deletions

View File

@ -212,15 +212,11 @@ public class FileWriter implements IWriter {
}
/**
* Write log to the queue. W/ performance trade off, set 2ms timeout for the log OP.
* Write log to the queue. W/ performance trade off.
*
* @param message to log
*/
@Override public void write(String message) {
try {
logBuffer.offer(message, 2, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
e.printStackTrace();
}
logBuffer.offer(message);
}
}