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

c Ö¸ÕëʵÏÖÃæÏò¶ÔÏó

Ö¸ÕëÊÇCµÄÁé»ê£¬ÕýÊÇÖ¸ÕëʹµÃC´æÔÚÁËÕâô¶àÄ꣬¶øÇÒ½«³¤ÆÚ´æÔÚÏÂÈ¥¡£ÊÂʵÉÏ£¬ÎÒ×Ô¼º²»ÓÃCÓïÑÔд³ÌÐòÒѾ­ÓÐÒ»ÄêÁË£¬¹¤×÷ÖнӴ¥µ½µÄÖ»ÓÐjava£¬pythonºÍjavascript.×î½üÓÃCÍê³ÉÁËÒ»ÏÂÀàËÆÓÚOOÖеķâ×°£¨¼´"Àà"£©µÄ¸ÅÄ˳±ã°ÑÖ¸Õ븴ϰÁËÏ£¬¸Ð¾õÓбØÒª¼Çһϡ£
    ±¾ÎÄÖеÄÀý×ÓÓÐÕâÑùÁ½¸ö¸ÅÄÈÎÎñ£¨Task£©£¬Ö´ÐÐÆ÷£¨Executor£©¡£ÈÎÎñÓÐÃû³Æ£¨taskName£©£¬²¢ÇÒ¿ÉÒÔÖ´ÐУ¨execute£©¡£ ¶øÖ´ÐÐÆ÷Óë¾ßÌåÈÎÎñËùÖ´ÐеÄÄÚÈÝÎ޹أ¬Ö»Êǻص÷£¨callback£©ÈÎÎñµÄÖ´Ðз½·¨£¬ÕâÑùÎÒÃǵÄÖ´ÐÐÆ÷¾Í¿ÉÒÔ×öµÄ±È½ÏͨÓ᣶øÈÎÎñ½Ó¿ÚÖ»ÐèҪʵÏÖÒ»¸öexecute·½·¨¼´¿É£¬ÕâÑùÎÒÃǵÄÈÎÎñ¾Í¿ÉÒÔÊǶàÖÖ¶àÑùµÄ£¬¿ÉÒÔͨ¹ýͳһµÄ½Ó¿Úset¸øÖ´ÐÐÆ÷Ö´ÐС£ÕâÊÇÃæÏò¶ÔÏóÖлù±¾µÄ˼Ï룬ҲÊDZȽϳ£ÓõijéÏó·½Ê½¡£ÏÂÃæÎÒÃǾßÌå¿´ÏÂÀý×Ó¡£
    ¿ÉÒÔÏëÏó£¬mainº¯Êý´ó¸ÅÊÇÕâ¸öÑù×Ó£º
 int¡¡main(int¡¡argc,¡¡char**¡¡argv)¡¡{
¡¡¡¡¡¡¡¡Task¡¡*t1¡¡=¡¡TaskConstruction("Task1",¡¡run);//´Ë´¦µÄrunÊÇÒ»¸öº¯ÊýÖ¸Õë
¡¡¡¡¡¡¡¡Executor¡¡*exe¡¡=¡¡ExecutorConstruction();
¡¡¡¡¡¡¡¡exe->setTask(t1);
¡¡¡¡¡¡¡¡exe->begin();
¡¡¡¡¡¡¡¡exe->cancel();
¡¡¡¡¡¡¡¡Task¡¡*t2¡¡=¡¡TaskConstruction("Task2",¡¡run2);//´Ë´¦µÄrun2Ò²ÊÇÒ»¸öº¯ÊýÖ¸Õ룬ÓÃÓÚ¹¹ÔìÒ»¸öTask.
¡¡¡¡¡¡¡¡exe->setTask(t2);
¡¡¡¡¡¡¡¡exe->begin();
¡¡¡¡¡¡¡¡exe->cancel();
¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡return¡¡(EXIT_SUCCESS);
}
    ÔËÐнá¹ûΪ£º
 task¡¡:¡¡[Task1]¡¡is¡¡ready¡¡to¡¡run
[a¡¡=¡¡1.200000,¡¡b¡¡=¡¡2.300000]
[(a¡¡+¡¡b)¡¡*¡¡(a¡¡-¡¡b)¡¡=¡¡-3.850000]
cancel¡¡is¡¡invoked¡¡here
task¡¡:¡¡[Task2]¡¡is¡¡ready¡¡to¡¡run
another¡¡type¡¡of¡¡execute,just¡¡print¡¡out¡¡some¡¡information
cancel¡¡is¡¡invoked¡¡here
ºÃÁË£¬ÏÂÃæÏêϸ¿´¿´ÊµÏÖ£º
    ¶¨Òå½Ó¿Ú
    Ê×ÏÈ£¬¶¨ÒåTaskºÍExecutorÁ½¸öʵÌåµÄ½Ó¿Ú£º
    Task½Ó¿Ú£¬×¢ÒâÆäÖеÄ_this×ֶΣ¬Õâ¸öÖ¸ÕëÔÚºó±ßÓкÜÖØÒªµÄ×÷Óã¬ÓÃÓÚholdÕû¸öTaskµÄʵÀý¡£È»ºóÊÇÒ»¸ötaskNameµÄ×Ö·û´®£¬ºÍÒ»¸öº¯ÊýÖ¸Õ룬Õâ¸öÖ¸ÕëÔÚ³õʼ»¯£¨¹¹Ô죩Taskʱ´«Èë¡£Õâ¸öexecute£¨£©º¯Êý±È½ÏÓÐÒâ˼£¬Ëü²»ÔÚÄÚ²¿Ê¹Ó㬶øÊÇÈÃÖ´ÐÐÆ÷»Øµ÷Ö´Ðеġ£
 #ifndef¡¡_ITASK_H
#define¡¡¡¡¡¡¡¡_ITASK_H
typedef¡¡struct¡¡Task{
¡¡¡¡¡¡¡¡struct¡¡Task¡¡*_this;


Ïà¹ØÎĵµ£º

¹ØÓÚperlÖкÍCÖеÄsort»úÖÆ £¨×ªÔØ£©

¹ØÓÚperlÖкÍCÖеÄsort»úÖÆ
£¨×ªÔØ£©
ϸ¶ÁC++ primer£¬ÖÕÓÚÀí½âÁËÒ»Ö±±È½ÏÒÉ»óµÄperlºÍCµÄsortº¯Êý»úÖÆ¡£ÎÒµ½²»ÊÇÒÉ»óËüµÄÓ÷¨£¬¶øÊǺÜÒÉ»óËüµÄÐÎʽ£¬ÎªÊ²Ã´Òª´«µÝÒ»¸ö×Ó³ÌÐòµÄÄäÃûÒýÓøøËüÄØ£¬¶øÇÒÐÎʽ»¹ºÜ¹Å¹Ö£¬Ò»¶¨ÒªÊÇ$a<$b£¬$a<=>$bÖ®ÀàµÄ¡£ÒªÇóÑϸñÇҹŹ֡£
½ñҹͻȻ¿´µ½p.384Ò³£¬¿´µ½ÊéÉ϶ÔquicksortÅÅ ......

C/S ÓëB/S¼Ü¹¹Çø±ðÏê½â£¨×ª£©

Ò»¡¢Ê²Ã´ÊÇC/SºÍB/S
ÒªÏë¶Ô“C/S”ºÍ“B/S”¼¼Êõ·¢Õ¹±ä»¯ÓÐËùÁ˽⣬Ê×ÏȱØÐë¸ãÇå³þÈý¸öÎÊÌâ¡£
µÚÒ»¡¢Ê²Ã´ÊÇC/S½á¹¹¡£
C/S £¨Client/Server£©½á¹¹£¬¼´´ó¼ÒÊìÖªµÄ¿Í»§»úºÍ·þÎñÆ÷½á¹¹¡£ËüÊÇÈí¼þϵͳÌåϵ½á¹¹£¬Í¨¹ýËü¿ÉÒÔ³ä·ÖÀûÓÃÁ½¶ËÓ²¼þ»·¾³µÄÓÅÊÆ£¬½«ÈÎÎñºÏÀí·ÖÅäµ½Client¶ËºÍServer¶ËÀ´Ê ......

C¹«Ë¾×ܽá

È¥ÁËÌËC¹«Ë¾INTviewÁËһϣ¬Ê±¼äÓеã¾ÃÁË£¬¸Ã°ÑһЩÊÕ»ñÕûÀíÒ»ÏÂÁË£¬ÃâµÃÒÔºóÔÙ·¸¡£ 1, ¸öÐÔÐÔ¸ñ·½ÃæµÄÌáÎÊÀýÈ磺¸öÈËȱµã£¬ÎªÊ²Ã´¾õµÃ×Ô¼º±È±ðÈËʤÈι¤×÷£¬¸öÈË×îÂúÒâµÄʵȵÈÖ®À࣬ҪÈÏÕæµÄ×¼±¸Ò»Ï¡£ 2£¬C¹«Ë¾µÄ¼¼ÊõÈËÔ±²Î²î²»Æ룬²îµãµÄºÜ¿´ÖØÄãµÄ×ö¹ýµÄÏîÄ¿¾­Ñ飬¶øÇÒÒÔÊýÁ¿È¡Ê¤£¬ÕâÒ²¸ø×¼±¸ÃæÊÔµÄͬѧÌáÁ˸öÐÑ£¬²»Ò ......

ÓÃCдµÄ3DÃÔ¹¬

          Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
       ´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸еģ¬»î»î»î£¡
         &n ......

»ùÓÚXMLµÄÈý²ãC/SÄ£ÐÍ

[ÕªÒª]¿ÉÀ©Õ¹±êÖ¾ÓïÑÔ£¨¼ò³ÆXML£©ÔÚʵÏÖÐÅÏ¢±ê×¼»¯¡¢ÐÅÏ¢µÄ½»Á÷Óë¹²ÏíÉÏÓÐÆä¶ÀÌصļ¼ÊõÓÅÊÆ£¬Òò´ËËüÊܵ½Á˹㷺µÄÖØÊÓ¡£È«ÎÄÊ×ÏÈÌá³öÁË»ùÓÚXMLµÄÈý²ãClient/ServerÄ£ÐÍ£»È»ºó¶ÔÆä´ÓÊý¾Ý»ñÈ¡¡¢´«ÊäÖÁÏÔʾÒÔ¼°Íⲿ´¦ÀíµÄÓ¦ÓýøÐзÖÎö£»½Ó×ÅÒÔͼÊé×ÊÁϹÜÀíϵͳΪÀý£¬ËµÃ÷ÁËÆä¾ßÌåµÄʵÏÖ£»×îºó¶Ô»ùÓÚXMLµÄÈý²ãC/SÄ£ÐÍÔÚÐÅÏ¢±ê×¼» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ