📄 readme.txt
字号:
Licensed Materials - Property of IBM
C99VCEN
C87CFNA
(c) Copyright IBM Corporation 1999, 2007
All rights reserved.
IBM, Lotus, Lotus Notes, Notes, and Domino are trademarks or registered
trademarks of Lotus Development Corporation and/or IBM Corporation
in the United States, or other countries, or both.
PROGRAM
-------
mthread - Sample program that shows the structure of a multi-threaded
C++ API program.
This program spawns five threads that send mail to each other.
Each thread exists until a call to LNDatabase::Search finds a
message for the thread.
ENVIRONMENTS
------------
32-bit Windows
IBM i5/OS
FILES
-----
mthread.cpp - Main program.
mswin32.mak - Make file for Win 32 platform using Microsoft Visual C++.
readme.txt - This file. Specifies what is needed to use this example.
mk_mthread_i.clp - Make file (CL Program) for IBM i5/OS using ILE C++
with the source code being an IFS file.
mk_mthread_p.clp - Make file (CL Program) for IBM i5/OS using ILE C++
with the source code being in a source physical file.
RUNNING mthread
---------------
This sample program runs against the current user's mail database. Type
'mthread' at the system command prompt.
On the i5/OS -
1) Add the environment variable PATH:
ADDENVVAR ENVVAR(PATH)
VALUE('/QIBM/PRODDATA/LOTUS/NOTES:/QIBM/USERDATA/LOTUS/NOTES:
/<server data directory>')
2) Then execute:
SBMJOB CMD(CALL PGM(qntcppsdk/mthread)) USER(qnotes)
CPYENVVAR(*YES) ALWMLTTHD(*YES)
or (for Domino 6.02 and later releases)
RUNDOMCMD SERVER(<server>)
CMD(CALL PGM(qntcppsdk/mthread))
BATCH(*YES) ALWMLTTHD(*YES)
The console window should display output similar to the following:
Starting thread: 0
Starting thread: 1
Starting thread: 2
Thread: Michael thread started.
Thread: Michael thread sending message.
Starting thread: 3
Thread: Dave thread started.
Thread: Serge thread started.
Thread: Dan thread started.
Starting thread: 4
Thread: Dave thread sending message.
Thread: Serge thread sending message.
Thread: Dan thread sending message.
Thread: Police thread started.
Thread: Police thread sending message.
Thread: Serge thread found message.
Thread: Serge thread shutting down
Thread: Dan thread found message.
Thread: Dan thread shutting down
Thread: Dave thread found message.
Thread: Michael thread found message.
Thread: Dave thread shutting down
Thread: Michael thread shutting down
Thread: Police thread found message.
Thread: Police thread shutting down
Execution successful
All Done. Hit return to exit:
Note that the order of the progress messages may not be the same as in
the example output above.
CHECKING THE RESULT
-------------------
To see if mthread worked correctly:
1. Use Notes to open your mail database.
2. The Drafts folder should contain five new messages in no particular
order, authored by the current user and with the following subject
lines:
Oh, no! Here come the Cops!
Hey, Dave!
Hey, Dan!
Hey, Serge!
All right, guys, let's stop the spam mail now!
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -