Customized version of luaproc

Luaproc is one of the multi-thread implementation for Lua. Compared with other lua multi-thread implementation, it provides several interesting features. See this paper: http://www.inf.puc-rio.br/~roberto/docs/ry08-05.pdf , which is written by the big names of Lua commnunity.

Recently, I want to rewrite the multi-thread module for one of  my project to support the distribution computation. After considering several lua multi-task implementation ( LuaTask, luaproc, lane etc ), I decided to use luaproc as the base to build my module. However, I found that luaproc do not provide the interfaces to manage the life cycle of lua processes. After calling luaproc.newproc(), the only thing I can do is waiting for its end. I even can not identify a process, because there is no identifier for lua process. Since the management of process life cycle is very important for my module, I modified luaproc to support these requirements. Two new functions were added to both of the parent process and child process.

Continue reading

How to add under line effect to multiple lines in Revtex

In Latex, the command \underline is for adding the under line effect in your text. For example,

This is an under example.

However, if you use this for multiple lines, the line wraps will disappear, the multiple lines come to be one unique line.

To solve this, you can use the ulem package.

usepackage{ulem}

And for highlighting your text by under line, use the \uline command.

This will provide you the under line effect for multiple lines.

A drawback of this method is that it changes the default emphasis behaviors. All the other text highlighted by command \emph will be underlined too. This might not be what we want. For example, in revtex, emphasis is shown by the italic font.

Continue reading