?? faq.so
字號:
m4_comment([$Id: faq.so,v 10.3 2002/12/10 23:41:42 mjc Exp $])m4_ref_title(Programmer Notes, Programmer notes FAQ,, program/runtime, lock/intro)m4_nlistbeginm4_idefz(task/thread @priority)m4_nlist([dnlm4_bold([What priorities should threads/tasks executing m4_db functionsbe given?])m4_p([dnlTasks executing m4_db functions should have the same, or roughlyequivalent, system priorities. For example, it can be dangerous to givetasks of control performing checkpoints a lower priority than tasks ofcontrol doing database lookups, and starvation can sometimes result.])])m4_nlist([dnlm4_bold([Why isn't the C++ API exception safe?])m4_p([dnlThe m4_db C++ API is a thin wrapper around the C API that maps mostreturn values to exceptions, and gives the C++ handles the samelifecycles as their C counterparts. One consequence is that if anexception occurs while a cursor or transaction handle is open, theapplication must explicitly close the cursor or abort the transaction.])m4_p([dnlApplications can be simplified and bugs avoided by creating wrapperclasses around m4_ref(Dbc) and m4_ref(DbTxn) that call the appropriatecleanup method in the wrapper's destructor. By creating an instanceof the wrappers on the stack, C++ scoping rules will ensure that thedestructor is called before exception handling unrolls the block thatcontains the wrapper object.])])m4_nlistendm4_page_footer
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -