, 21 2021 . 18:23
+
85: 4 - 4. 0 - ( ), 1 - , 2 - , 3 - .
- . - 25% 3 . 3 - 8% ; , . , 3 75% , 25%?
- . " File | New | Other | Thread Object".
H-.
//x`oa'i`ea "a`a'i'i^u~o `e d`a~n"ida"aa"ea'i`ea "i^i `i`a~n~n`e^a`a`i.
class CThread_1_Core : public TThread
{
private:
protected:
void __fastcall Execute();
public:
__fastcall CThread_1_Core(bool CreateSuspended);
};
//^I`od`e~n^i^a^e`a ~ad`a^o`e^e`a.
class CThread_2_Core : public TThread
{
private:
protected:
void __fastcall Execute();
public:
__fastcall CThread_2_Core(bool CreateSuspended);
};
//A`ua :`o^i-'i`e'a'o"a"u.
class CThread_3_Core : public TThread
{
private:
protected:
void __fastcall Execute();
public:
__fastcall CThread_3_Core(bool CreateSuspended);
};
CPP-.
__fastcall CThread_1_Core::CThread_1_Core(bool CreateSuspended) : TThread(CreateSuspended){}
__fastcall CThread_2_Core::CThread_2_Core(bool CreateSuspended) : TThread(CreateSuspended){}
__fastcall CThread_3_Core::CThread_3_Core(bool CreateSuspended) : TThread(CreateSuspended){}
.
void __fastcall TForm_Main::Timer_ImportTimer(TObject *Sender)
{
//C`a~ad'oc^e`a "a`a'i'i^u~o.
CThread_1_Core *OThread_1_Core = new CThread_1_Core(true);
OThread_1_Core->Resume();
//"Ida"a^a`ad`e`oa"e"u'i^u'e ~n`a`i^i^e^i'i`od^i"e"u "a`a'i'i^u~o "ad'o~a`e`i "y"ad^i`i.
if (g_ORocket_Info->iRead_Count != 0)
{
CThread_3_Core *OThread_3_Core = new CThread_3_Core(true);
OThread_3_Core->Resume();
}
//^I`od`e~n^i^a^e`a ~ad`a^o`e^e`a "ad'o~a`e`i "y"ad^i`i.
CThread_2_Core *OThread_2_Core = new CThread_2_Core(true);
OThread_2_Core->Resume();
}
( ).
void __fastcall CThread_3_Core::Execute()
{
SetThreadAffinityMask(GetCurrentThread(), 3 << 1); // , 0.
g_ORocket_Info->vSelfTest(0);
Terminate();
Free();
}
https://forum.sources.ru/index.php?showtopic=423139&view=findpost&p=3852216
:
Borland C++ Builder/Turbo C++ Explorer