Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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++Ö®¼äµÄ²»Í¬

£¨×¢£¬±¾ÎÄÊÇ·­ÒëµÄhttp://www.cprogramming.com/
ÉϵÄÎÄÕ Where C and C++ Differ
£©
C++»ùÓÚC£¬Ò²±£ÁôÁËCµÄ´ó²¿·ÖÌØÐÔ¡£µ«ÊÇÔÚÔ´Â뼶ÉÏÓÐЩµØ·½ÊÇÓëC²»¼æÈݵġ£
C³ÌÐòԱʹÓÃC++ʱµÄÏÝÚå
´Ó void* µÄÒþʽ·ÖÅä
²»ÄÜ´Ó void* ÒþʽµØ·ÖÅäµ½ÆäËûÈκÎÀàÐÍ¡£ÀýÈ磬ÏÂÃæµÄ´úÂëÔÚCÖÐÊǷdz£ÓÐЧµÄ¡£
    in ......

B/S ÓëC/S µÄÇø±ð


B/S½á¹¹£¬¼´Browser/Server£¨ä¯ÀÀÆ÷/·þÎñÆ÷£©½á¹¹£¬ÊÇËæ×ÅInternet¼¼ÊõµÄÐËÆ𣬶ÔC/S½á¹¹µÄÒ»Öֱ仯»òÕ߸ĽøµÄ½á¹¹¡£ÔÚÕâÖÖ
½á¹¹Ï£¬Óû§½çÃæÍêȫͨ¹ýWWWä¯ÀÀÆ÷ʵÏÖ£¬Ò»²¿·ÖÊÂÎñÂß¼­ÔÚÇ°¶ËʵÏÖ£¬µ«ÊÇÖ÷ÒªÊÂÎñÂß¼­ÔÚ·þÎñÆ÷¶ËʵÏÖ£¬ÐγÉËùν3-tier½á¹¹¡£B/S½á¹¹£¬Ö÷ÒªÊÇ
ÀûÓÃÁ˲»¶Ï³ÉÊìµÄWWWä¯ÀÀÆ÷¼¼Êõ£¬½áºÏä¯ÀÀÆ÷µÄ¶àÖ ......

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

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

c# ²Ù×÷mssqlÊý¾Ý¿â º¬Óдø²ÎÊýsqlÓï¾äÔËÐÐ

<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <appSettings>
  <add key="Default" value="Default" />
 </appSettings>
 <connectionStrings>
  <add name="Default" connectionString="Data Source=192.168.1.197;User ID ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ