请教parfor中matlab调用函数出错错的问题

2013年4月 硬件/嵌入开发大版内专家分月排行榜第二2007年9月 硬件/嵌入开发大版内专家分月排行榜第二
2013年5月 硬件/嵌入开发大版内专家分月排行榜第三2012年9月 硬件/嵌入开发大版内专家分月排行榜第三2007年11月 硬件/嵌入开发大版内专家分月排行榜第三
2014年7月 硬件/嵌入开发大版内专家分月排行榜第二
2013年10月 硬件/嵌入开发大版内专家分月排行榜第三2013年6月 硬件/嵌入开发大版内专家分月排行榜第三2013年3月 硬件/嵌入开发大版内专家分月排行榜第三
2013年12月 VB大版内专家分月排行榜第二2013年3月 VB大版内专家分月排行榜第二2013年1月 VB大版内专家分月排行榜第二2012年9月 VB大版内专家分月排行榜第二2012年8月 VB大版内专家分月排行榜第二2012年7月 VB大版内专家分月排行榜第二2006年7月 VB大版内专家分月排行榜第二2006年5月 VB大版内专家分月排行榜第二
2014年9月 VB大版内专家分月排行榜第三2013年7月 VB大版内专家分月排行榜第三2013年6月 VB大版内专家分月排行榜第三2013年4月 VB大版内专家分月排行榜第三2012年11月 VB大版内专家分月排行榜第三2006年6月 VB大版内专家分月排行榜第三2006年4月 VB大版内专家分月排行榜第三2002年12月 VB大版内专家分月排行榜第三2002年11月 VB大版内专家分月排行榜第三
2013年4月 硬件/嵌入开发大版内专家分月排行榜第二2007年9月 硬件/嵌入开发大版内专家分月排行榜第二
2013年5月 硬件/嵌入开发大版内专家分月排行榜第三2012年9月 硬件/嵌入开发大版内专家分月排行榜第三2007年11月 硬件/嵌入开发大版内专家分月排行榜第三
本帖子已过去太久远了,不再提供回复功能。搜索“parfor参数”的网页标题
1&matlab并行计算之parfor_火舞不知_新浪博客日&-&parfor变量一共分为5类,每一类的定义和用途就不说了,看一眼就明白。需要注意的是以下几点 (1)循环变量 循环变量在循环体中的使用一定要具有独立性,循...
2&parfor参数_资讯导航2 parfor参数_资讯导航2 parfor参数_资讯导航你的位置:易配网 & 新闻 & parfor参数_资讯导航“parfor参数”相关资讯parfor参数_资讯导航:手机资讯_易配网……应...
3&新版2014b不能parfor问题 – MATLAB中文论坛
4&parfor-- matlab并行计算教程 - machine learning world - CSDN博客日&-&新版2014b不能parfor问题,有没谁知道原因,还有,好像2014都没mdce了,怎么回事?回复...所有维度参数必须大于零 回复此楼 举报 cleverblue 新手 7 麦片财...
5&MATLAB并行计算问题(应该是变量传递出了问题)_百度知道日&-&1.将Monte Carlo模拟过程中不会改变的参数都写在Parfor循环块外面
2.生成随机数、计算f(x)等过程都写在Parfor里面
3.不要将V0结果传递出Parfor,而是...
专业问答网站
6&matlab并行之parafor - - CSDN博客[专业]答案:MATLAB并行计算问题(应该是变量传递出了问题)并行计算中parfor循环要求内部不受外部影响,就是说,parfor循环对外要有独立性。而你的程序中,f(1,col(i))=0;牵涉...更多关于parfor参数的问题&&
7&matlab 采用parfor循环,时间比采用for循环增加几倍,求..._百度知道日&-&matlabpool('open','local',4); %最后一个参数是你要开启的线程数 parfor i=1:N ... end matlabpool close ... end 如果你的parfor怎么都通不了,或者...
专业问答网站
8&新版2014b不能parfor问题 – MATLAB中文论坛最佳答案: 不熟并行计算配置,但你这样显然是没有并行处理 因为显示每个CPU核心负荷50%,实际相当还是单线程在跑。只不过win7后改进了CPU的核心调度模式,将单线程负载...更多关于parfor参数的问题&&
9&matlab并行之parafor_最后一道防线_新浪博客日&-&新版2014b不能parfor问题,有没谁知道原因,还有,好像2014都没mdce了,怎么回事?...所有维度参数必须大于零 回复此楼 举报 cleverblue 新手 7 麦片财富积...
10&新版2014b不能parfor问题 – MATLAB中文论坛日&-&matlabpool('open','local',4); %最后一个参数是你要开启的线程数 parfor i=1:N ... end matlabpool close ...
共11,800条搜索结果
时间: 07:49:42
本文来自: ,转载请保留出处!
本文链接: parfor参数_
手机配件资讯导航Q: HOWTO: Post messages to a hidden window for raising events from an Apartment-threaded object employing worker threads
The reason this technique is useful is discussed in . The basic principle is posting a custom Windows message to a hidden window created on the STA thread the COM object lives in and firing the event on that thread. The basic limitation is all event arguments must be [in] only, it cannot be used for acquiring data from the client sink(s). The main advantage is that unlike the other techniques, it does not block the worker thread while waiting for the client sink(s) to process the notifications.
While the theory is simple, there's a principle roadblock - the sheer amount of code to be written to support it. The purpose of this article is to provide a tiny framework for streamlining the process so it's less painful. In an ideal world, it'd be coming with a wizard that parses a type library and generates the whole supporting code. Some day this may become true, but for now, here's the framework in its current condition.
Note on terms: the process of packaging a method's call arguments and transferring them into another execution context to make the actual method call is called marshaling and is integral part of remote procedure calling (RPC). Since the task we solve is a variation on marshaling (do not confuse with COM marshaling though), the framework itself is called Message Marshal.
The basic architecture consists of three classes that operate together to transport the call from the originating thread to the desired thread where it is to be fired. The message marshal class is the main interface of the framework. You derive your ATL COM object class from one of the supplied CMessageMarshalXXX classes that best suits your purposes (discussed shortly), initialize it accordingly (typically in your FinalConstruct method), and call its MarshalMessage method to initiate the thread switching process. The message holder class is the engine behind the framework - it accepts the marshaling requests on the originating thread and dispatches them to the target thread to be fired to the client. Finally, the message class is the actual representation of the arguments of the method that has to be called (the event notification). It stores copies of all arguments and later uses them to make the actual call invocation in the client's sink. This is the framework's data abstraction class and the one the users of the framework write themselves.
The core of the framework is the message holder class - CMessageHolderSTA. It's mostly transparent to the code outside of the framework with one exception - it can be reused for multiple marshaling classes, as we'll discuss later. It's purpose is twofold - it provides storage for the marshaled messages during their transit from the originating call thread to the destination fire thread, and it also provides the internal signaling and signal handling to actually execute the call further along its chain on the target thread. In addition to CMessageMarshalSTA, another class is provided for us with free-threaded objects - CMessageMarshalMTA. Although it's not necessary to do thread switching as long as the originating thread also belongs to the MTA, this class solves the problem of the originating thread being blocked for the duration of the event notification call(s). Also, this class is useful if the originating thread has entered an STA, or does not belong to any apartment. Change the default argument of the message marshal class you are using if you intend on using this framework with free-threaded objects.
The message classes representing the arguments to a message call are provided by you. They must derive from CMessageBase and implement its pure virtual method Execute. The CMessageBase class provides simple abstraction for the actual method arguments. Your derived classes should contain members storing copies of all non-scalar arguments (like strings, arrays, structs...). Typically, each method would need a separate class for its marshaling. These classes are usually small, unless you have many complex arguments (which leads to more code for making the copies). The CMessageBase class provides basic reference counting by implementing IUnknown under the hood. It's further enhanced by the DECLARE_CREATE_DYN_MESSAGE macro which you'd put in each of your message classes. This macro provides a wrapper around CComObject::CreateInstance for constructing messages on the heap (it makes most sense to have them on the heap) and returns an AddRef-ed blank message. The method name is CreateMessage and it is static, so you'd use it like the following:
class CMyMessage : public CMessageBase{
...DECLARE_CREATE_DYN_MESSAGE(CMyMessage)
...};CMyMessage *pMsg = NULL;HRESULT hr = CMyMessage::CreateMessage(&pMsg);
A slight enhancement is the CMessageDelegate&& template class deriving from CMessageBase. It adds an owner field which is automatically populated when used in conjunction with the corresponding owner marshal classes. You'd likely want to pass in the ATL COM object class whose event you are marshaling for the owner template argument, since it must match the owner template argument of the marshal class. Use CMessageDelegate&& in place of CMessageBase for your messages' base class and you gain its m_pOwner field, which you'd typically use to forward the calls back to the data class' owner that originated the request. Typically, the Execute implementation would use m_pOwner to invoke the appropriate FireXXX method of the corresponding proxy class for the event interface generated by the ATL's Implement Connection Point wizard (since the ATL COM Object class derives from the proxy class).
The final piece of the framework is the message marshal class. Its purpose is to bind to a suitable message holder that does the actual marshaling. Four marshal classes are provided with the framework. Two of them contain a message holder and can be used standalone - they are also called host classes. The other two accept an external holder and can only be used in conjunction with a host. These are useful when building an object hierarchy of tightly integrated objects - the root of the hierarchy provides a single holder that is used by any subobjects that need to report events. The reason is simple - the resource encapsulated by the message holder (a hidden window for an STA, a kernel thread for MTA) is expensive and you don't want to allocate many of these unnecessarily. Both the hosts and the lightweight marshalers come in two flavors: a basic variant works with messages derived from CMesageBase directly, whereas the owner variant is used in conjunction with CMessageDelegate&& to automatically setup its owner field.
An extra feature useful for loosely coupled object hierarchies is message tagging. The idea is simple - if a subobject goes out of scope and is destroyed before its parent (the one that contains the holder), it can requests all of the messages issued by its marshaler to be cancelled. This facility is only available on the holder directly. To support it, pass the same non-zero tag (your this pointer for example, cast to DWORD_PTR) with each message sent to your marshaler.
Observant readers will notice the additional class CTagPtrQueue&& used in the implementation of CMessageHolderBase (the base class for the STA and the MTA flavors). It's a class I've developed for this and other reasons, it has a lot of functionality not used here, though since it's a template, the unused features won't ever be compiled. You can use it as it is, and even for your own purposes, or you may rewrite it in your own way (using STL for example). It's a thread-safe queue with extras.
The last piece of the puzzle is your class deriving from the chosen message marshal. As was mentioned before, typically this is your ATL COM object class, and you need to pass it as the Owner template argument of the marshal class. A well organized class would provide as many methods as the events it will be firing, whose sole purpose is to create the appropriate message, initialize it with the method arguments and pass it down to the message marshal. These are the replacement methods for the FireXXX methods from the proxy class generated by the ATL Implement Connection Point wizard, and you'll be calling them to the same effect from your worker thread code. Just like the proxy class, these can be combined into another proxy class which you'd derive from in your ATL COM object class. For example:
// The message classtemplate&class Owner&class CMshlPxy__EventGenEvents_Event : public CMessageDelegate& Owner &{public:
HRESULT Init(long nNumber, BSTR bstrText, double dblValue)
m_bstrText = bstrT
m_dblValue = dblV
return (bstrText != NULL) && (m_bstrText == NULL) ? E_OUTOFMEMORY : S_OK;
virtual void Execute()
static_cast&Owner*&(this)-&FireEvent(m_nNumber, m_bstrText, m_dblValue);
DECLARE_CREATE_DYN_MESSAGE(CMshlPxy__EventGenEvents_Event& Owner &)protected:
CComBSTR m_bstrT
double m_dblV};// The marshaling proxy classtemplate&class T&class CMshlPxy__EventGenEvents{public:
HRESULT Event(long Number, BSTR Text, double Value)
// Create the marshal message with our owner as the template argument
CMshlPxy__EventGenEvents_Event& T & *pMessage = NULL;
HRESULT hr = CMshlPxy__EventGenEvents_Event& T &::CreateMessage(&pMessage);
if (SUCCEEDED(hr)) {
hr = pMessage-&Init(Number, Text, Value);
// Send the message to the marshal class
(base of our derived class passed as a template argument)
if (SUCCEEDED(hr)) {
hr = static_cast&T*&(this)-&MarshalMessage(pMessage) ? S_OK : E_FAIL;
// Get rid of our reference on the message
if (pMessage != NULL) {
pMessage-&Release();
To support the framework, your class has to initialize and shutdown the marshal class via its InitMarshal and DoneMarshal methods. Typically, this is done in your FinalConstruct and FinalRelease methods. InitMarshal of the lightweight flavor marshals is also the place to pass in the external holder, whereas the host marshals expose the GetHolder method so their holder can be shared with other lightweight marshal classes.
This concludes the overview of the tiny Message Marshal framework.
contains the core files of the framework.
is a sample (sans the project files) demonstrating the use of the framework. The framework can be used beyond the scenario detailed here - transporting events from a worker thread to be fired to the client's sinks. Any such applications are left to the readers.
阅读(...) 评论()查看: 6378|回复: 14|关注: 0
求教:Matlab调用子函数错误
<h1 style="color:# 麦片财富积分
新手, 积分 5, 距离下一级还需 45 积分
如题,在主文件中调用子函数时出现错误,请高人指教:lol
简略代码如下:
[sl,sr]=Split(S,2,47.02);
函数文件Split.m:
%描述:根据指定属性和值划分数据集函数
%输入:总数据集S和属性序号k,切点t
%输出:根据属性划分的两个子集
function [Sl,Sr]=Split(S,k,t)
出现错误代码为:
The expression to the left of the equals sign is not a valid target for an assignment.
试了很久也没找到问题所在,请教,多谢:'(
论坛优秀回答者
关注者: 116
原帖由 qinhuaiyue 于
13:54 发表
如题,在主文件中调用子函数时出现错误,请高人指教:lol
简略代码如下:
[sl,sr]=Split(S,2,47.02);
函数文件Split.m:
%描述:根据指定属性和值划分数据集函数
%输入:总数据集S和属性序号k,切点t
%输出:根据属性划分的两个子 ...
是直接这样调用的吗?
[sl,sr]=Split(S,2,47.02);
那S要事先赋过值才行
如S=[5 6 7 8];[sl,sr]=Split(S,2,47.02);
就可以执行了
About me:/article-43-1.html
<h1 style="color:# 麦片财富积分
不好意思,我忘记提了,S已经赋过值了,主要是那个错误代码,说等号左边的变量无效,不知道是什么意思?
论坛优秀回答者
关注者: 116
原帖由 qinhuaiyue 于
14:15 发表
不好意思,我忘记提了,S已经赋过值了,主要是那个错误代码,说等号左边的变量无效,不知道是什么意思?
那说明,你的函数中只有一个值输出了,另一个值没有输出
或者一个输出都没有
把你函数内部的代码贴一下
About me:/article-43-1.html
<h1 style="color:# 麦片财富积分
没有,函数输出两个数据集
%描述:根据指定属性和值划分数据集函数
%输入:总数据集S和属性序号k,切点t
%输出:根据属性划分的两个子集
function [Sl,Sr]=Split(S,k,t)
rows=size(S,1);
for i=1:rows
& & if a(i,1)&t
& && &&&k=k+1;
& && &&&Sl(k,:)=S(i,:);
& && &&&l=l+1;
& && &&&Sr(l,:)=S(i,:);
论坛优秀回答者
关注者: 116
原帖由 qinhuaiyue 于
14:25 发表
%描述:根据指定属性和值划分数据集函数
%输入:总数据集S和属性序号k,切点t
%输出:根据属性划分的两个子集
function [Sl,Sr]=Split(S,k,t)
rows=size(S,1);
for i=1:rows
& & if a(i,1) ...
那问题应该出在你的代码上
可能是这两上条件之间是互相独立的
面你的数据可以恰好,只满足其中一个条件
所以只输出一个结果,而另一个结果没有值
为了避免这样,你可以把另一个赋成空的,或者零
或者重新写一下你的函数文件,保证每次调用
无论输入什么参数,都可以有两个输出
[ 本帖最后由 ljelly 于
14:33 编辑 ]
About me:/article-43-1.html
<h1 style="color:# 麦片财富积分
问题是还没到那一步呢,主文件运行到调用函数那一行时就出错了,根本就没有进入到子函数当中,所以才很奇怪,应该没有语法错误啊
论坛优秀回答者
关注者: 116
原帖由 qinhuaiyue 于
14:38 发表
问题是还没到那一步呢,主文件运行到调用函数那一行时就出错了,根本就没有进入到子函数当中,所以才很奇怪,应该没有语法错误啊
肯定是进去了,才发现的错误
你的理解上有点问题
你把命令窗中出现的全部红色出错代码,贴一下,看提没提到函数
要么就把你主文件和函数代码都贴一下,别这样猜来猜去的
About me:/article-43-1.html
<h1 style="color:# 麦片财富积分
出错代码:
??? Error: File: D:\Extremely RDT\Split.m Line: 7 Column: 6
The expression to the left of the equals sign is not a valid target for an assignment.
Error in ==& TestFunction at 38
[sl,sr]=Split(S,2,47.02);
S=[45& & & & 72& & & & 91& & & & 17& & & & 1
& & 44& & & & 71& & & & 90& & & & 17& & & & 1
& & 45& & & & 72& & & & 90& & & & 16& & & & 1
& & 45& & & & 71& & & & 90& & & & 17& & & & 1
& & 45& & & & 71& & & & 91& & & & 18& & & & 1
& & 75& & & & 87& & & & 96& & & & 86& & & & 2
& & 84& & & & 92& & & & 97& & & & 99& & & & 2
& & 79& & & & 86& & & & 97& & & & 89& & & & 2
& & 81& & & & 94& & & & 95& & & & 114& & & & 2
& & 69& & & & 87& & & & 90& & & & 51& & & & 2
& & 71& & & & 89& & & & 92& & & & 43& & & & 2
& & 58& & & & 75& & & & 88& & & & 110& & & & 2
& & 48& & & & 67& & & & 83& & & & 124& & & & 3
& & 44& & & & 67& & & & 82& & & & 124& & & & 3
& & 40& & & & 59& & & & 82& & & & 103& & & & 3
& & 38& & & & 57& & & & 80& & & & 93& & & & 3
& & 39& & & & 60& & & & 81& & & & 96& & & & 3
& & 53& & & & 68& & & & 84& & & & 116& & & & 3
& & 59& & & & 70& & & & 88& & & & 98& & & & 4
& & 47& & & & 65& & & & 84& & & & 107& & & & 4
& & 42& & & & 60& & & & 81& & & & 110& & & & 4
& & 42& & & & 60& & & & 82& & & & 112& & & & 4
& & 55& & & & 66& & & & 86& & & & 87& & & & 4
& & 55& & & & 66& & & & 86& & & & 81& & & & 4
& & 75& & & & 86& & & & 106& & & & 51& & & & 5
& & 57& & & & 67& & & & 93& & & & 39& & & & 5
& & 59& & & & 76& & & & 94& & & & 42& & & & 5
& & 62& & & & 70& & & & 96& & & & 49& & & & 5
& & 68& & & & 79& & & & 97& & & & 53& & & & 5
& & 124& & & & 126& & & & 120& & & & 109& & & & 6
& & 136& & & & 121& & & & 129& & & & 104& & & & 6
& & 146& & & & 138& & & & 130& & & & 115& & & & 6
& & 139& & & & 134& & & & 127& & & & 103& & & & 6
& & 87& & & & 82& & & & 104& & & & 74& & & & 6
& & 113& & & & 124& & & & 117& & & & 112& & & & 6
& & 104& & & & 109& & & & 114& & & & 79& & & & 6];
[sl,sr]=Split(S,2,47.02);
子函数代码刚才已经贴过了
MATLAB 基础讨论版块优秀回答者
关注者: 135
原帖由 qinhuaiyue 于
02:38 PM 发表
问题是还没到那一步呢,主文件运行到调用函数那一行时就出错了,根本就没有进入到子函数当中,所以才很奇怪,应该没有语法错误啊
把[sl,sr]=Split(S,2,47.02);这一行设置断点,运行到这里后,点击调试工具条上的step in 按钮,单步调试看看。问题应该很简单的。
站长推荐 /2
快速搭建新能源汽车整车模型及其性能优化
MATLAB中文论坛是全球最大的 MATLAB & Simulink 中文社区。用户免费注册会员后,即可下载代码,讨论问题,请教资深用户及结识书籍作者。立即注册加入我们吧!
MATLAB官方社交平台
MATLAB中文论坛微社区请教delphi 多线程调用函数出错~~~|::::编程乐园:::: - ★广海社区★ -
授人以鱼不如授人以渔 - Powered by phpwind
查看完整版本: [--
请教delphi 多线程调用函数出错~~~
&&写了个范围打怪的多线程&&后来加了个寻路的CALL&&运行的时间长了就报错,研究了两天 都找不出毛病,请高手看看问题在哪里...&& 这个是范围杀怪多线程&&&&while&&( PlayGame = 1 ) do&&&begin&&&&&&范围打怪XXXXX&&&&&&-------------------------------------------&& ↑&&多线程&&&&寻路CALL&&procedure AutoRoad(MapId,Mapx,Mapy:Integer);&&&&&&&&&&&&&&&&&&&&&&&&&&&&//&&寻路CALL&&(寻路CALL是对的 死命的点击调用都不会出错 )&begin&&&寻路XXXX&end&&&&------------------------------&&由于寻路CALL 调用的过程中被玩家或者怪物攻击 会停止,于是就加了个判断的函数&&寻路到指定目的地&&procedure AutoMapSite(SiteMapId,SiteMapx,SiteMapy:Integer);&&//&&寻路到目的地函数&&(目的地地图ID,目的地X,目的地Y)&&begin&&&try&&&&&while (GetMapID && SiteMapId) do&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& //&&GetMapID&&是当前地图ID&& SiteMapId&&是目的地地图ID &&&&&begin&&&&&&&if ( 当前状态= 停止 ) then&&&&&&&begin&&&&&&&&&AutoRoad(SiteMapId,SiteMapx,SiteMapy);&&&&&&&&&&&&&&&&&&&&//&& 寻路CALL&& (&&有个朋友说这个地方有问题,需要处理,我又继续找了好多资料都找不到问题在哪 )&&&&&&&&&&&&&&Sleep(1200);&&&&&&&&except&&&&&OutputDebugString(&#39;寻路到目的地出错&#39;);&&&&&E&&&&&&&--------------------------------------------------- && 攻击部分肯定是没问题的,我一直在用,也不出错, 就是加了一个攻击的时候超出返回就回到 挂机点&&&&运行时间长了之后 游戏画面直接消失,短时间看不出问题&&用 EurekaLog 反馈出的是&&访问地址冲突,&&实在是头大&&&&请高手来支招。。。。。。。。。&&&&&&
以老衲的经验目测问题应该是由于多线程抢占资源造成的,多线程不等同于timer即来即用,必须控制资源的读写锁,需要加信号量、临界区、信号灯来控制,至于更稳定的办法,呵呵。。。先说这么多了。。。
procedure AutoMapSite(SiteMapId,SiteMapx,SiteMapy:Integer);换成procedure AutoMapSite(SiteMapId,SiteMapx,SiteMapy:single);&运行时间长了之后 游戏画面直接消失&& 是别的原因
:以老衲的经验目测问题应该是由于多线程抢占资源造成的,多线程不等同于timer即来即用,必须控制资源的读写锁,需要加信号量、临界区、信号灯来控制,至于更稳定的办法,呵呵。。。先说这么多了。。。&#160;( 03:19)&#160;&&加临界区了&&没什么效果, 而且只启动了一个多线程,能确定的就是那个函数只被多线程调用,没其它地方调用
代码我没仔细看你的,但是这种情况,很大就是抢占资源造成,数据不能同步,所以在运行后,随机一个时间发生资源竞争的情况;另外,只要你做在线程内,不管你是开一个线程还是多个线程,都会有概率和主线程发生资源竞争的情况,哪怕是个小小的血值、距离等的地址,如果你直接在线程里调用而未做任何控制,都可能挂掉,只不过针对数据调用的频繁程度决定了风险概率的高低,但是可以肯定的是风险肯定存在。你可以试试另外用timer来做一下需求的功能,几乎同样的代码,在timer里就不会存在这样的问题,结论就可以显而易见了
对于多线程来说,同步是必须要考虑到的重点&如果不同步,那各个线程之间就不能协调运行&就可能会因为同时访问同一资源造成冲突&如果不处理同步,多线程就是扯淡&就像铁路运输网一样,跟火车之间都是有协议的&某个时间段某列火车在什么位置,速度多快,到站要停多久&都是需要实时调度的,这也是一个同步的概念&要不然整个系统如何运作?
:代码我没仔细看你的,但是这种情况,很大就是抢占资源造成,数据不能同步,所以在运行后,随机一个时间发生资源竞争的情况;另外,只要你做在线程内,不管你是开一个线程还是多个线程,都会有概率和主线程发生资源竞争的情况,哪怕是个小小的血值、距离等的地址,如果你直接在线程 ..&#160;( 13:30)&#160;&&谢谢,我知道问题大概就是这个意思,但是我之前 加了临界区 也出现这个问题&&我自己尝试写了个timer 调用,直接新建一个应用程序可以调用&但是移植到 DLL 调用没效果 ,可能是写错了,句柄我传递的是游戏句柄
查看完整版本: [--
Powered by
Time 0.075081 second(s),query:2 Gzip enabled}

我要回帖

更多关于 c 函数的调用 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信