Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C# C/S³ÌÐò³ö´í£ºContextSwitchDeadlock is detected

½ñÌìÔÚVS2005µ÷ÊÔÒ»¸öC# C/S³ÌÐò£¬µ±Í¨¹ýRFCÓëSAPÁ¬½Óʱ¼ä¹ý³¤Ê±£¬³öÏÖ´Ë´íÎó£¬ÔÚÍøÉÏÕÒµ½½â¾ö°ì·¨¡£
VS2008ÉϵÄÒ»¸ö³ÌÐò£¬Í¨¹ýOracle.DataAccess.dllÖ´ÐÐdrop user
cascade²Ù×÷£¬ÎÒÔÚsqlplusÖ´Ðд˲Ù×÷´óÔ¼ÐèÒªÒ»·ÖÖÓ×óÓÒʱ¼ä£¬µ±ÎÒÔÚVS2008ÖÐdebugÆô¶¯´Ë³ÌÐòʱ£¬Ò»Ö±½ÓÊÕµ½
“ContextSwitchDeadlock is detected”ÏûÏ¢£¬²Ù×÷ÎÞ·¨½øÐÐÏÂÈ¥¡£
MSDNµÄ½âÊÍÒ»Èç¼´ÍùµØ×¨Òµ²¢ÇÒÁîÈ˷ѽ⣺
“Èç¹ûÔÚÊÔͼ½øÐÐCOMÉÏÏÂÎÄת»»ÆÚ¼ä¼ì²âµ½Ò»¸öËÀËø£¬Ôò½«¼¤»îContextSwitchDeadlockÍйܵ÷ÊÔÖúÊÖ (MDA)¡£ ”
“Ô­ÒòºÜ¿ÉÄÜÊǵ¥Ï̵߳¥Ôª(STA)Ï̲߳»·¢ËÍÏûÏ¢¡£STAÏ̻߳òÕߵȴý¶øÇÒ²»·¢ËÍÏûÏ¢£¬»òÕßÖ´ÐÐÒ»¸ö³¤Ê±¼äµÄ²Ù×÷¶øÇÒ²»ÔÊÐí·¢ËÍÏûÏ¢¶ÓÁС£”
ÎÒû¿´³öÕâ³ÌÐò¸úCOMÓÐʲô¹ØÏµ¡£¿´Á˰ëÌ죬ֻ¿´µ½“³¤Ê±¼äµÄ²Ù×÷”Ã²ËÆ»¹Õ´µã±ß£¬½â¾öµÄ·½·¨µ¹ÊǼò
µ¥£¬Debug->Exceptions->Managed Debugging
Assistants->ContextSwitchDeadlock,¹³³ý“Thrown”ÏîµÄ¸´Ñ¡¿ò¡£
BTW£¬
1£©COM£¬Component Object Model£¬Ëüʵ¼ÊÊÇÒ»ÀàÈí¼þ¿ª·¢·½Ê½¡£¶øCOM×é¼þ¹ËÃû˼ÒåÊǰ´ÕâÖÖ·½Ê½¿ª·¢³öÀ´µÄÈí¼þ/Ä£¿é£¬¿´¿´Project->References->Add References->COMÏÂÁгöµÄ×é¼þ¡£
2£©µ¥Ï̵߳¥Ôª£¨STA£©£ºµ±Äãн¨Ò»¸öWindowsFormÏîÄ¿£¬ÔÚÈë¿ÚMain()·½·¨ÉÏ¿ÉÒÔ¿´µ½±êʶµÄÊôÐÔ£¬STAThread˵Ã÷Ó¦ÓóÌ
ÐòµÄ COM Ïß³ÌÄ£ÐÍÊǵ¥Ï̵߳¥Ôª£¬Ò»°ã³öÏÖÔÚMain·½·¨Ç°¡£´óÒâÊÇÔÚÓëCOM»¥²Ù×÷ʱ±£Ö¤¶ÔÏóµÄḬ̈߳²È«ÐÔ£¬ÄÚ²¿Ï¸½Ú²»Ïê¡£


Ïà¹ØÎĵµ£º

¼òÊöCºÍC++³ÌÐòԱѧϰÀú³Ì

×ÜÊDZ»Í¬Ñ§ÃÇÎʵ½£¬ÈçºÎѧϰCºÍC++²Å²»Ã£È»£¬²Å²»ÊÇÂÒѧ£¬ÏëÁËһϣ¬ÕâÀï¸ø³öÒ»¸ö×ܵĻظ´¡£ 
¡¡¡¡Ò»¼ÒÖ®ÑÔ£¬»¶Ó­ÅÄש¹þ¡£ 
¡¡¡¡1¡¢¿ÉÒÔ¿¼ÂÇÏÈѧϰC. 
¡¡¡¡´ó¶àÊýʱºò£¬ÎÒÃÇѧϰÓïÑÔµÄÄ¿µÄ£¬²»ÊÇΪÁ˳ÉΪһ¸öÓïÑÔר¼Ò£¬¶øÊÇÏ£Íû³ÉΪһ¸ö½â¾öÎÊÌâµÄר¼Ò¡£×öÒ»¸öÓÐÓõijÌÐòÔ±£¬×öÒ»¸ö׬ǮµÄ³ÌÐòÔ±¡£ÎÒÃǵļ ......

CÓïÑԸ߼¶²âÊÔ£ºÎªC³ÌÐòÔ±×¼±¸µÄ0x10¸ö×î¼ÑÎÊÌâ

Õû¸ö²âÊÔ×ñÑ­ÒÔϵÄÔ¼¶¨£º
u
      
¼Ù¶¨ÔÚËùÓеijÌÐòÖбØÐëµÄÍ·Îļþ¶¼ÒѾ­±»ÕýÈ·°üº¬¡£
¿¼ÂÇÈçϵÄÊý¾ÝÀàÐÍ£º
u
      
char
Ϊ
1
¸ö×Ö½Ú
u
      
int
Ϊ
4
¸ö×Ö½Ú
u
      ......

OpenSolaris¹¹½¨C/C++¿ª·¢»·¾³

Ò»Sun Studio  ¼ò½é
     Sun Studio ÊÇ Solaris/OpenSolaris ²Ù×÷ϵͳÉϵÄÊ×Ñ¡¿ª·¢»·¾³¡£Ëü°üº¬²¢ÓÅ»¯ÁË C ¡¢ C++ ¼° Fortran ±àÒëÆ÷£¬¶øÇÒÈÚÈëÁËÒµ½çÁìÏ鵀 IDE ºÍÐÔÄܵ÷ÊÔ¼¼Êõ¡£Ëæ×ÅÈíÓ²¼þ¼¼Êõ·¢Õ¹¹ØÏµµÄµ÷Õû£¬¿ª·¢¶à´¦ÀíÆ÷ºÍ¶àÏß³ÌÓ¦ÓõÄÖØÒªÐÔÕýÈÕÒæÍ»³ö£¬¶ø Sun StudioÔÚ¿ª·¢¶àÏ̳߳ÌÐò£¨Ó ......

pythonµÄC¡¢c++À©Õ¹

pythonµÄC¡¢c++À©Õ¹
http://blog.chinaunix.net/u3/110228/showart_2148725.html
pythonµÄÇ¿´ó²»½ö±íÏÖÔÚÆä¹¦ÄÜÉÏ£¬¶øÇÒ»¹±íÏÖÔÚÆäÀ©Õ¹ÄÜÁ¦ÉÏ¡£
ʹÓÃC/C++ºÜÈÝÒ×±àдpythonµÄÄ£¿é£¬À©Õ¹pythonµÄ¹¦ÄÜ¡£
ͬʱ½«ÐÔÄÜÒªÇó±È½Ï¸ßµÄ´úÂëʹÓÃC/C++±àд£¬ÄܸüºÃµÄÃÖ²¹
½Å±¾ÓïÑÔÖ´ÐÐËÙ¶ÈÂýµÄȱÏÝ¡£
1. pythonµÄCÓïÑÔÀ©Õ¹
1.1 ......

C/C++ÓïÑÔʵÏÖ¶¯Ì¬Êý×é

C/C++ÓïÑÔʵÏÖ¶¯Ì¬Êý×é
CÊý×éµÄСÎÊÌâ
     ÕâÀï˵µÄ¶¯Ì¬Êý×éÊÇ¿ÉÒÔ¸ù¾ÝÐèÒª¶¯Ì¬Ôö³¤Õ¼ÓÃÄÚ´æµÄÊý×飬±ÈÈç³ÌÐò³õʼ·ÖÅäÁË100¸öÔªËØ£¬¿ÉÊÇÔËÐÐÁËÒ»¶Îʱ¼äºóÇøÇø100¸ö¿Õ¼ä²»ÄÜÂú×ãÁË£¬ÏÖÔÚÐèÒª400¸ö£¬Ôõô°ìÄØ£»Äǿ϶¨ÐèÒªÔÙ¶îÍâ·ÖÅä300¸ö¡£
     CÓïÑÔÓÐrealloc()º¯ÊýÀ´½â¾ö¿Õ¼ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ