Skip to content

Commit

Permalink
table
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanglei5 committed Dec 4, 2014
1 parent 60704d8 commit 901c2ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/13.swoole_table.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ swoole_table->__construct(int $size)
| int size | 表格的最大行数 |
**说明**
* 创建对象后会创建一个Mutex锁。
* $table->lock()/$table->unlock() 在这之后即可使用。
* $table->lock()/$table->unlock() 在这之后即可使用。

> swoole_table基于行锁,所以单次set/get/del在多线程/多进程的环境下是安全的
set/get/del是原子操作,用户代码中不需要担心数据加锁和同步的问题
使用示例:
Expand Down

0 comments on commit 901c2ea

Please sign in to comment.