[AS3 Worker] Thread Test

 

드디어 As3 에 Worker 라는것이 생겼다.

바로 Thread 이다.

하지만 , 방법이 조금 지저분 하다.

실행되고 있는 바이트 코드를 그대로 복제하여 ,백그라운드에서 실행하고 그 결과를 메시지 체널 형태로 주고 받는다.

정확한 Thread 의 개념 보다는 .NET 의 BackgroundWorker 쯤으로 생각하면 될듯하고

쓰레드를 직접실행할 클래스 형태가 필요하다.

 

아래의 ThreadManager 는 구차한 Worker 생성과정을 미리 생성하고 Thread 객체를 관리하는 매니저 역할이다.

또하나의 Worker1 클래스는 쓰레드 개체가 생성하게될 , 즉 쓰레드가 수행할 내용이다.

아래의 실험은 같은 개체를 동시에 실행 하였을때 쓰레드 블럭킹이 발생하는지 실험하는 코드이다.

 

* ThreadManager

 
package
{
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.KeyboardEvent;
    import flash.ui.Keyboard;
    
    import jjongun.threadWorker.Thread;
    import jjongun.threadWorker.ThreadEvent;
    import jjongun.threadWorker.ThreadManager;
    
    public class TestThread3 extends Sprite
    {
        private var thread1 : Thread;
        private var thread2 : Thread;
        public function TestThread3()
        {
            ThreadManager.Init(this.stage);
            
            thread1 = ThreadManager.getInst().createThread(Work1);
            thread2 = ThreadManager.getInst().createThread(Work1);
            
            thread1.addEventListener(ThreadEvent.RECEIVE , receive);
            thread2.addEventListener(ThreadEvent.RECEIVE , receive);
            
            thread1.start();
            thread2.start();
            
            stage.addEventListener(KeyboardEvent.KEY_UP , stageKup);
        }
        
        protected function stageKup(e:KeyboardEvent):void
        {
            if(e.keyCode == Keyboard.A)
            {
                trace("A");
                thread1.send(Work1.F1);
            }
            else if(e.keyCode == Keyboard.S)
            {
                trace("S");
                thread2.send(Work1.F2);
            }
        }
        
        protected function receive(e:ThreadEvent):void
        {
            if(e.currentTarget == thread1)
            {
                trace(e.receiveData);
            }
            else if(e.currentTarget == thread2)
            {
                trace(e.receiveData);
            }
        }
    }
}

 

 

 

 

package
{
    import flash.utils.getTimer;
    
    import jjongun.threadWorker.AbsThreadWorker;
    
    public class Work1 extends AbsThreadWorker
    {
        public function Work1()
        {
            super();
        }
        
        public static const F1 : String = "F1";
        public static const F2 : String = "F2";
        protected override function threadMessage(command:*):void
        {
            trace("command " , command);
            if(command == F1)
            {
                f1();
            }
            else if(command == F2)
            {
                f2();
            }
        }
        
    
        
        private function f1():void
        {
            trace("start _ f1 " , getTimer());
            
            var b : Boolean = true;
            var cur : Number = getTimer();
            while(b)
            {
                if(getTimer() - cur > 3000)
                {
                    b = false;
                }
            }
            
            trace("end _ f1" , getTimer());
        }
        
        private function f2():void
        {
            trace("start _ f2 " , getTimer());
            
            var b : Boolean = true;
            var cur : Number = getTimer();
            while(b)
            {
                if(getTimer() - cur > 3000)
                {
                    b = false;
                }
            }
            
            trace("end _ f2" , getTimer());
        }
    }
}

 

결과 블럭킹이 전혀 발생하지 않았고 상상했던 Thread의 역할을 충분히 수행해 주었다.

 

주의할점은 현재 시점으로 11.4 버전 -swf-version=17 만 가능하다.

혹 그 윗버전의 SDK 로 시도 해보았지만 작동이 안된다. 이유는 모른다. 버그 같다. 어도비 포럼에도 질문만 있을뿐 답이 없다.

머 ,, 곧 해결 되겠지만 , 현재 11.4 버전 만 된다. 버전 체크를 하여 수행하여야 하겠다.

 

'AS3' 카테고리의 다른 글

FLA Auto build utility for flashbuilder developer  (2) 2014.02.22
[AS3] asmx 사용하기  (87) 2013.01.12
[AS3 Worker] Thread Test  (2920) 2012.11.15
간단한 AS3 바이트 버퍼 나누기  (110) 2012.03.09
[Multitouch on 3D World]  (92) 2012.01.17
[Base64]  (282) 2011.12.19
Yamecoder 야매코더_
tags : AS3, Thread, worker
AS3 2012. 11. 15. 23:38

댓글을 달아 주세요

  1. 이전 댓글 더보기
  2. BlogIcon 匿名 2015.04.13 19:19  수정/삭제  댓글쓰기

    방기Greetings again from the darkness. Caught a screening of this after only seeing one trailer, which had done little to spark my interest. I will issue a "chick flick" alert; however, this is a rare case of that alert not ruining a movie for guys. This is an excellent film, period.

    Director Curtis Hanson, who helmed one of my all-time favs "L.A. Confidential" brings a reality to the film that pre로료

  3. BlogIcon 匿名 2015.04.13 19:19  수정/삭제  댓글쓰기

    니상Welcome to the online store. The is a successful shoe that combined the practical applicability and fashion together. If you put on one pair of the MBT Shoes London, you will share the super feeling as though walking on the soft beach. The MBT Trainers have adapted the Massi Barefoot Technology to achieve the goal of keeping our health. Wear on everyday you can promote blood circulation, and decre드정

  4. BlogIcon 匿名 2015.04.13 19:19  수정/삭제  댓글쓰기

    일는  Fax: (86) 5410 9322



      [城市]:上海市



      系列 : 和运动和运动鞋



      联系 : (邮箱)info-china@puma



      13 Floor, XuHuiYuan Building, 1089 ZhongShan No. 2 Rd. (S.)



      设计师 : Werner Hofer



      Fax: +49 ? 9132 ? 81 ? 2246



      PUMA AG



      General Inquiries



      [地址]:上海市中二路1089号徐汇苑大厦13楼



      PUMA-WAY 1



      中国分店 : Puma的产品在、杭州、南京和西安开设Puma店铺。Puma在全国各大城市授权的零售店销售뉴야

  5. BlogIcon 匿名 2015.04.13 19:19  수정/삭제  댓글쓰기

    일려本公司是一家集设计开发、生产制造、销售为一体的电子行业科技型企业。 公司本着创新的理念,依据科学的开发技术,凭借先进的工艺,采用完善的管理模式和质量管理体系,拥有对电子产品的设计开发和创新能力。目前主要产品有LED节能灯、LED电子蜡烛、鞋服闪光灯、电子鞋灯、工艺礼品电子、精品电子、太阳能灯饰、玩具、箱包电子产品等。品种齐全形式多样,广泛应用于室内照明、家居装饰、鞋类、工艺品、精品玩具、广告促销礼品、包袋等市场。目前公司在其他电子领域正至力开发拥有自主产权及专利的产品。 公司遵循以市场为导向,以客户为中心的发展战略,秉承“以诚信为根本,以质量求生存”方针,竭诚为广大客户提供优质的产品与服务,在同等质量条件下,力求让给客户最大的利润空间,真正做到物美价廉,实现互利互惠共同发展。 主营:开发设计生产鞋灯、电子鞋灯、防水鞋灯、shoeslight、拖鞋灯、童鞋灯、布鞋灯、服饰闪灯音乐器、服饰灯、기일

  6. BlogIcon 匿名 2015.04.13 19:19  수정/삭제  댓글쓰기

    선겠It was back to the drawing board once again when Nike devised the initial designs for its Air Max “Breathe” Collection. Striped to its base first, Nike rebuilt each portion with two key goals in mind – to make it lighter and more breathable. One of the outcomes was the Air Max Light Breathe, seen here in Pure Platinum, University Red. and Team Red. Constructed through a no-sew manufacturing proces조표

  7. BlogIcon Womens Luxury Shoes 2015.04.14 04:46  수정/삭제  댓글쓰기

    지일Charlotte Premium Outlets will open July 31 in Steele Creek, and the nearly 400,00-square-foot outlet center will have 100 stores — up from the 90 planned initially.

    The mix of retailers will sell apparel and shoes, fashion accessories,Christian Louboutin Peep-Toe Pumps, leather goods, home furnishings and specialty goods.

    The outlet mall is a 50-50 joint venture between Indianapolis-based I지어

  8. BlogIcon converse θεσσαλονικη 2015.04.14 06:38  수정/삭제  댓글쓰기

    메방Will . No longer care about them , Francis took Xiaoqing hand ,all star converse αθηνα, quickly stepped forward ,autentisitet converse billig, and went about half an hour ,converse all star παπουτσια, appeared in front of a valley , a lot of people in that valley droves sat ,pa nett converse sko norge, standing,blue sko converse, keep walking . "My brother, here is really good fun ah ! They are d리예

  9. BlogIcon all star converse greece 2015.04.14 06:38  수정/삭제  댓글쓰기

    부네An unhappy look,pink gronne converse, asked some strange . "He , ah, I estimate that because of the thinking of those other spiritual fire where ? " Hook from said with a smile . "Do seniors know the location of other spiritual fire ? " Francis heard from the hook so to speak,blue converse sko billig, eyes bright, their own eyes the do not know live how old ,barn hvite converse, certainly know a l조겠

  10. BlogIcon all star converseελλαδα 2015.04.14 06:38  수정/삭제  댓글쓰기

    버가I want to think this person is dead magician . If they are , Ka Nuosi Belle child and the man stood so close , if the fight is likely to suffer first , and then you want to let the Ka Nuosi and Belle child back to the crowd ,blue converse sko billig, beating together somewhat preparedness . "Teacher, this person is likely dead magician ,converse all star αθηνα, be careful ! " Francis has not forgo히있

  11. BlogIcon φθηνά all star converse 2015.04.14 06:38  수정/삭제  댓글쓰기

    데습Francis finished ring from space come up with two bottles of immortality , a bottle of rejuvenation Dan , last gave the Bei Luota whole bottle ,converse θεσσαλονικη, a bottle of righteousness Dan , Francis refining immortality ,pink gronne converse, as long as it is used to enhance the combat effectiveness of the fight when ,παπουτσια converse all star, was supposed to his family fought the orcs ,마단

  12. BlogIcon converse ψυχικο 2015.04.14 06:38  수정/삭제  댓글쓰기

    리는While talking , while waving Staff , the ambient temperature is getting lower and lower ,converse all star ελλαδα, to the last small area it began to snow to . "Woo ... woo ... woo ... " Firefox can not be last to flee this area ,blue sko converse, would have thought that the temperature is not low so outrageous ,autentisitet converse billig, so it want to play and in front of the human good , bu그리

  13. BlogIcon converse all star αθηνα 2015.04.14 06:39  수정/삭제  댓글쓰기

    어리A bad disappear forever in this world . "Good,converse shoes greece, good ,converse all star παπουτσια, good ! Days Lingcao Well ,παπουτσια nike, the family seems to be kind of this plant ,pa nett converse sko norge, I 'll whereabouts of family refining pharmacists , and tomorrow I will give you brought ! " Ken Delin touched Francis head , very pleased , said . "Well ,converse all star παπουτσια, 스그

  14. BlogIcon blue converse sko billig 2015.04.14 06:39  수정/삭제  댓글쓰기

    히법The Xiaoqing hit say hello and walked toward the inn . When Francis ,Salg billige converse, who left the crowd of people dispersed , the mayor is to see However Francis arrogance ,norway converse billig, went to the forest normalizing side , almost subordinate to the higher tone to speak ,kvinner converse storrelser, said: " Pegg son , you see,παπουτσια converse all star, this man is so arrogant ,려네

  15. BlogIcon Salg billige converse 2015.04.14 06:39  수정/삭제  댓글쓰기

    이일Do not believe that other people also think that a crazy Xiaoqing sad , she had went on to explain ,boots converse storrelser, "If you do not believe their own good view,outlet converse stovler, my brother really has been all right ! " The Kamani heard Xiaoqing said very seriously ,converse all star ελλαδα, unlike talking nonsense , then dubious check it against the body of Francis ,all star conve단다

  16. BlogIcon barn hvite converse 2015.04.14 06:39  수정/삭제  댓글쓰기

    련분Good standing here like these . "Ke Guan, you can finally woke up a small two pushed open the door and come in to see Francis is standing at the window thinking mind trance . "Well ! , I slept in this for a long time thing ? " Francis Huiguo Shen , saw the waiter a look you finally wake up , it is estimated that sleep for a very long time . "Is not a long time , it is quite a long time ! Did you k는간

  17. BlogIcon converse all star ελλαδα 2015.04.14 06:39  수정/삭제  댓글쓰기

    일고Brother not to his true body ,Oslo svarte converse, just let my brother a good experience ,norge converse veske sko, and the strength of the opponent than he fights . " , " Francis finished the outset put the snake nine - eighth style snake storm , just this strong Francis know , can not be taken lightly ,converse ψυχικο, most proud of with their own sword type to be able to try out the gap betwee메가

  18. BlogIcon Nike SKO 2015.04.14 07:19  수정/삭제  댓글쓰기

    일수Merry Christmas fitflop singaporeto learn more about all your family and yours!
    I do nothing more than wanted to understand more about be capable of geting that in the market to learn more about everyone which of you readonitsuka tiger singapores and or subscribes to learn more about my very own gleam Examiner has changed and so much in the way given that I started back whilst in the February hav부정

  19. BlogIcon fitflop shoes 2015.04.14 07:21  수정/삭제  댓글쓰기

    수련Mixed tape electronica at no time sounded and consequently white chocolate Foxes and Fiction is always that 20-year-old Torcheap fitfloponto native Warren Hildebrand,which of you made his at the outset appearance and Rochester Friday, July 9 at Boulder Coffee Co. He showed then thaonitsuka tiger minit each of them is a resource box takes to understand more about can get a layered sound that is sim종습

  20. BlogIcon Asics Baratas 2015.04.14 13:22  수정/삭제  댓글쓰기

    있마Its exciting for additional details on say a multi functional EDM Music is always finally just around the corner to New Jersey! Yes I am talking about Electric Daisy Carnival (EDC),an all in one internationally recognized EDM Music Festival dispensed everywhere in the Las Vegas every spring and summer and all the way through lots of other areas as part of your USA and World.; The in which situatio이가

  21. BlogIcon fitflop singapore 2015.04.14 13:23  수정/삭제  댓글쓰기

    을다Today’s featured artist has to be that Que,an all in one Chicago musician and dancer which of you has already been entertaining crowds considering the fact that he was 9-years age - old Que brings zapatillas New Balancea multi function certain energy for more information regarding his art as your dog painstakingly focuses beyond any and all detail regarding his art, fine-tuning almost any aspect h지리

[XNA , WPF] XNA 에서 코드레벨로 WPF 생성하기




필요한 레퍼런스는
 
System.Windows.Presentaion
System.Xaml
PresentationCore
PresentationFramework

이고  필요한 using 은

using System.Threading;
using System.Windows;
using System.Windows.Controls;

되겠다.


Created with colorer-take5 library. Type 'csharp'
XNA , Game1.cs 중 일부

        Texture2D tex;
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            tex = Content.Load<Texture2D>("logo2");
            this.Window.Title = "currentThread :" + Thread.CurrentThread.ManagedThreadId;
            
            //[0] 새로운 wpf 어플을 생성하기 위해 새로운 스레드 생성 , 스레트타입은 STA
            Thread t = new Thread(startThread);
            t.ApartmentState = ApartmentState.STA;
            t.Start();
        }
        void startThread()
        {
            //[1] Application 객체를 선언하고 생성
            Application app = new Application();
            //[2] StartUp 이벤트를 건다.
            app.Startup += new StartupEventHandler(app_Startup);
            //[3] 그리고 시작!
            app.Run();
        }

        void app_Startup(object sender, StartupEventArgs e)
        {
            //[4] 새로운 윈도우를 생성한다
            Window win = new Window();
            win.Width = 300;
            win.Height = 300;
            win.Title = "currentThread :" + Thread.CurrentThread.ManagedThreadId;
            //[5] 새로운 윈도우를 표시한다
            win.Show();

            Button bt = new Button();
            bt.Content = "XNA 에서 WPF 생성��기";
            win.Content = bt;
        }

역시나 윈도우폼과 마찮가지로 STA 타입의 스레드가 필요하다.
그러나 윈폼과 Application 의 사용법이 다른점에 주의! (그냥 Application.Run 하면 안된다.)

또한 닷넷4.0의 경우 System.Xaml 을 필히 참조 시켜줘야 겠다. 
Yamecoder 야매코더_
XNA 2011. 2. 1. 16:03

댓글을 달아 주세요

  1. 이전 댓글 더보기
  2. BlogIcon cheap mont blanc pens 2015.01.09 03:41  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  3. BlogIcon furla purses outlet 2015.01.09 06:45  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  4. 匿名 2015.01.14 18:27  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  5. 匿名 2015.01.14 18:29  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  6. 匿名 2015.01.15 12:22  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  7. BlogIcon mont blanc pen 2015.01.31 14:00  수정/삭제  댓글쓰기

    일에Saints big underdogs in Cup final vs

    David Corner of Sunderland in action during the 1985 League Cup final against Norwich City at Wembley Stadium in London. Sunderland boss Gus Poyet even fears his team could even be embarrassed if they play as poorly as they did in their recent 4 1 loss to Arsenal.

    Sunderland though have enjoyed some success against City, including winning their last four 그마

  8. BlogIcon louis vuitton outlet 2015.02.06 02:38  수정/삭제  댓글쓰기

    법에The most effective 10 The majority of well-known New york Artists

    Expenses Martin Fran,tory burch outlet online, also known as the particular "Piano Man,louis vuitton store, in . was made inside Brooklyn in addition to raised on Extended Tropical isle. Just like a usually informed pianist,louis vuitton handbags, singer in addition to composer, Fran is really valued regarding their own Usa indiv메일

  9. 匿名 2015.02.11 14:03  수정/삭제  댓글쓰기

    마메骑士服务端天上碑服务端美丽世界服务端科洛斯服务端石器时代服务端

    完美世界服务端烈焰服务端洛汗服务端新魔界服务端绝对女神私服务端

    征服服务端传说45服务端天之炼狱服务端天堂II私服务端墨香私服务端


    传奇开sf一条龙开区服务-

    天龙八部开私服一条龙服务-


    传奇广告代理-

    IDC服务器以及空间租用-

    魔域私服开区一条龙服务-


    客服咨询QQ(企鹅扣扣)49333685

    Email:49333685@qq.com

    后浪科技更多商业版本免费开放下载




    后浪科技科技仿官神武血魔版服务端



    后浪科技石器时代VIP最新V10纯金开区端



    后浪科技热血江湖3.5宠门武勋开区端



    后浪科技剑侠情缘X2.0商业版本服务端



    后浪科技v2.07已开5区七转神台天降横财八卦玄阵血魄技려지

  10. BlogIcon gucci sneakers 2015.02.12 03:10  수정/삭제  댓글쓰기

    습어Extend Miracle jingle bell band

    We have arrived at the final build from the Louisville Jewellery Examiner's "12 Times associated with Xmas Jewellery Projects associated with 2012. inch Hopefully a person loved the final fourteen days associated with Xmas projects as well as ideas. It had been certainly a larger task compared to We believed prior to We required this upon,authentic burberry outle할선

  11. BlogIcon tory burch reva shoes 2015.02.18 23:10  수정/삭제  댓글쓰기

    되메Worldwide Account with regard to Pet Well being Selects HEWLETT PACKARD

    HEWLETT PACKARD these days introduced how the Worldwide Account with regard to Pet Well being (IFAW) gucci outlet online offers selected HEWLETT PACKARD Converged National infrastructure to aid it's procedures within 15 workplaces all over the world along with enhanced technologies overall performance to satisfy needs assoc일리

  12. BlogIcon louis vuitton handbags 2015.02.20 13:58  수정/삭제  댓글쓰기

    지습Steps to make Angling Fishing lures

    Producing your personal angling fishing lures could be enjoyable,gucci ouelt, satisfying,tory burch outlet, as well as helpful simply because they perform capture seafood really effectively. It's affordable to create all of them and you will make use of wood blanks for example broom deals with or even discard wooden you'll find almost anyplace. Angling fishin려히

  13. BlogIcon fulinglasses review 2015.03.05 17:04  수정/삭제  댓글쓰기

    되메in line with the Mayo Clinic 4out of fiveindividuals within the U.S. will experience low back pain once or more through their lives.

    Back pain is a quite common complaint. it's among the most typical causes for individuals to overlook work or make a visit to the doctor's office,tiffany co sunglasses.

    there's a bright side. maximumback pain can also be prevented and when back pain treatme다로

  14. BlogIcon louis vuitton handbags 2015.03.07 16:31  수정/삭제  댓글쓰기

    한단Chevrolet HHR LS 07 chev hhr rear brakes how do you take shoes

    Refer to Vehicle Lifting,gucci oulet. Remove the tire and wheel assembly. Remove the adjuster assembly (2) from the brake shoes

    Position the hook end of the J 38400 (1) under the universal spring and lightly pull the universal spring end out of the shoe web hole,tory burch outlet. Hold the universal spring while removing the trai한를

  15. BlogIcon new balance womens running shoes 2015.03.19 01:00  수정/삭제  댓글쓰기

    리어Horse soring is really subject related to lively N

    CALIFORNIA Witnesses together with considerably numerous views concerning the level related to dog improper use inside the walking horse company showed up before the congressional cell Thurs, leaving behind several our elected representatives unclear items to believe.

    "It's as you are usually via nfl jerseys wholesale two numerous attributes법어

  16. BlogIcon chaussure louis vuitton homme 2015.03.20 11:08  수정/삭제  댓글쓰기

    리지Disturbance Acrylics,ray ban outlet

    Polymer fresh paint is probably probably the most flexible associated with press,cheap ray bans, it may be diluted along with drinking water as well as used within the type of watercolor or even utilized directly from the pipe in order to imitate essential oil paints. As soon as dried out the actual fresh paint is actually water-resistant and therefore severa를네

  17. BlogIcon chemise burberry femme 2015.03.27 21:10  수정/삭제  댓글쓰기

    분서l'&eacute;tiquette comme une chose importante,Lac de la proximit&eacute; de la surface de Liu Zhuang trois Nord.| | Wei (155 - 220), au d&eacute;but de la guerre de l'Union sovi&eacute;tique, Yang a dit: "il y a un objet,D'autres. Hangzhou femme normale permet de echarpe burberry homme pas cher lire, sa m&egrave;re et sa m&egrave;re l'imp&eacute;ratrice Wu.Tu n'as pas laiss&eacute; la partie r&eac일이

  18. BlogIcon burberry purses 2015.03.29 14:59  수정/삭제  댓글쓰기

    마를film to show Sunday at 2013 QFilm Festival in Long Beach

    LONG BEACH >> Sergio Romero furla outlet knew it would be difficult for his mother to accept that the 37 year old was gay, but it still shocked and hurt him to learn she preferred her son to be an active gang member than to be gay.

    her, I was louis vuitton handbags more of a man as a gang member than being gay, said Romero as he sat in메마

  19. BlogIcon burberry trench sale 2015.04.03 22:10  수정/삭제  댓글쓰기

    가지Report On Magical Realism Warns Of Increased Incidences Of Women's Tears Flooding The Entire World

    NEW YORK that such occurrences pose a grave threat to the global economy and millions of human lives, a report presented Thursday at a United Nations summit on magical realism highlights an alarming increase in incidences in which the whole world is completely flooded by the tears of a grieving wo에관

  20. BlogIcon michael kors wallet sale 2015.04.04 19:55  수정/삭제  댓글쓰기

    마메Proven brutality key to being North Korea's heir apparent

    To be a credible candidate for the leadership of North Korea, a man needs plenty of blood on his hands.

    Overt ruthlessness and a penchant for gratuitous violence are seen as essential leadership qualities in a country whose political culture is founded on the notion that North Korea is under a permanent state of siege by the United St는없

  21. BlogIcon furla online 2015.04.04 21:31  수정/삭제  댓글쓰기

    없부I've the S320 using the tranny within,furla handbags online

    Client: How do i Realize that I have to lso are check out? Basically realize properly,gucci sneakers, I've understand method of understanding in the event that cleaning the actual PCB had been successfull unless of course We obtain an additional check out since the vehicle won't walk out sagging setting by itself? Is actually which pro로비

[new Thread in new Form] 새로운 쓰레드 안에 새로운 윈도우폼

무작정 쓰레드를 생성하여 폼을 생성한다면... 
 
Thread t2 = new Thread(sample);
        t2.Start();
...
        private void sample()
        {
            Form n = new Form();
            n.Show();
        }
바로 폼이 깜빡 거리고 만다. 해당쓰레드가 바로 죽기 때문이다.
새로운 폼은 새로운 어플리케이션으로 생성해야 한다.
 
 
 
 
 
Thread t2 = new Thread(sample);
        t2.Start();
...
        private void sample()
        {
            //Form n = new Form();
            //n.Show();
Application.Run(new Form2());
        }
 
 주의할점은 Application.Run 앞에 모든 명령이 와야 한다.
해당 쓰레드는 Application을 기점으로 돌고 있기 때문에 Application 뒤에 명령이 온다면,
Application 이 종료된다음에 실행된다. while 문과 같다고 생각하면 되겠다.
 
Dispose 를 구현한다면 Application 뒤에 오는것도 나쁘지 않겠다.
 
ex> 
 
Application.Run(...);
Consol.writeLine("해당 어플리케이션이 종료되었습니다.");
 
 
 
 
 
더욱 안전한 방법을 원한다면 
BackgroundWorker 를 사용하는 방법도 있다.
 
보기
 
구현방법은 역시 같다.
Yamecoder 야매코더_
C# 2011. 1. 19. 17:18

댓글을 달아 주세요

  1. 이전 댓글 더보기
  2. BlogIcon 匿名 2014.09.11 01:22  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  3. BlogIcon 匿名 2014.09.11 12:20  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  4. BlogIcon moncler outlet store 2014.09.13 02:07  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  5. BlogIcon 匿名 2014.09.21 23:10  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  6. BlogIcon 匿名 2014.09.21 23:11  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  7. BlogIcon 匿名 2014.09.28 14:42  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  8. BlogIcon Cheap macbook pro 2014.11.01 21:29  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  9. 匿名 2014.11.10 17:32  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  10. BlogIcon 深圳横岗眼镜批发 2014.11.12 00:51  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  11. BlogIcon 眼镜批发 2014.11.12 00:52  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  12. BlogIcon Cheap iphone 6 2014.11.12 03:17  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  13. BlogIcon moncler mens jackets nordstrom 2014.11.12 11:46  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  14. 匿名 2014.12.03 05:44  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  15. 匿名 2015.01.14 18:28  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  16. 匿名 2015.01.14 18:29  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  17. 匿名 2015.01.19 10:54  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  18. BlogIcon 2012 Pro Bowl Jerseys 2015.02.07 23:58  수정/삭제  댓글쓰기

    법전Play VideoMcManus On Rice Elevator Video Released,San Antonio Spurs Jerseys,New England Patriots Jerseys





    Team USA Jerseys Washington Redskins Jerseys Kansas State Wildcats Jerseys



    "Pop told me,Knock Off Baseball Jerseys, 'As cool as it would be to hire you,Spain Jerseys,Michael Crabtree Jersey Texas Tech,LSU Tigers Jerseys, you have to be qualified and I have to make sure you 을할

  19. 匿名 2015.02.11 14:03  수정/삭제  댓글쓰기

    일있剑侠情缘服务端密传服务端街头篮球服务端A3私服务端破天一剑服务端

    魔域服务端魔兽世界服务端天龙八部服务端RF服务端传奇归来私服务端

    风云雄霸天下服务端天之炼狱一条龙大话西游服务端精灵复兴私服务端


    传奇世界私服开服一条龙服务-

    魔兽私服开区一条龙服务-


    IDC服务器以及空间租用-

    魔域开区sf一条龙开区服务-

    传奇广告代理-


    客服咨询QQ(企鹅扣扣)1292124634

    Email:1292124634@qq.com

    商业版本免费开放下载




    前沿科技1.80怀旧复古赤月终极烟花教主淘宝秒杀商城升级版



    前沿科技1.76雄霸特色大极品+50元素倚天辟地狂风连击传奇



    前沿科技3D真彩无英雄中变靓装元素傲天朱雀神龙毒血斩



    前沿科技至尊中变1.89无英雄元素立法之殿版

    버단

  20. 匿名 2015.02.11 14:04  수정/삭제  댓글쓰기

    히네大话西游服务端凡人修真服务端大话西游服务端页游服务端问道服务端

    跑跑卡丁车服务端英雄远征服务端幻灵游侠私服务端洪荒神话私服务端

    完美世界服务端烈焰服务端洛汗服务端新魔界服务端绝对女神私服务端


    魔兽私服开区一条龙服务-

    传奇私服开传奇一条龙服务-


    传奇广告代理-

    IDC服务器以及空间租用-

    魔域开区sf一条龙开区服务-


    客服咨询QQ(企鹅扣扣)1325876192

    Email:1325876192@qq.com

    商业版本免费开放下载




    紫川科技最新毁灭天下1.85狂雷独家合击热血复古三职业新装传奇服务端



    紫川科技20星大极品良装+80麒麟锻造中变传奇服务端



    紫川科技独家轻变1.89奥妙转生神龙锻造珍珑元素版传奇服务端



    紫川科技独家九转1.85四皇冠加倍装备特戒龙卫마및

  21. BlogIcon tiffany co sunglasses 2015.03.05 17:04  수정/삭제  댓글쓰기

    립뉴,fulinglasses review1 of two
    by Ramona Taylor

    Created on: November 15, 200nine

    Basketball officiating is usually a challenge, but when too can offera fewwonderfulnon-publicrewards. As
    2 of two
    by Steven Gomez

    Created on: November 17,persol 0714, 200nine 일리

[Simple Text Writer V0.1] 간편한 파일 쓰기 어플


간편한 파일 쓰기 어플



client code (AS3)

flush 규칙!


         파일경로(filePath):::내용(content) + "\n"

(':::' 요걸로 파일경로와 내용을 구분합니다.)


ex >> "c:\\sampleFolder\\childFolder\\content.xml"
         +":::
         +xml.toString()
         +"\n";


그냥 자기 컴퓨터에서 돌아가는 로컬용 입니다.(웹은 당연 안돌아가겠죠)
대용량은 테스트 안해봤습니다.
하루 종일 돌려보진 않았습니다.
피드백은 덧글로..
버전업은 할수 있을지. ,, 과연 = =;
옵션도 넣고 하려 했지만.. 일을 줄이기 위해 만드는건데, 이게 더 일이 될것 같아서 딱 필요한것만 구현했습니다.
Yamecoder 야매코더_
C# 2010. 12. 4. 02:35

댓글을 달아 주세요

  1. 이전 댓글 더보기
  2. BlogIcon doudoune moncler femme 2014.11.28 08:27  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  3. BlogIcon canada goose expedition parka 2014.11.29 06:32  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  4. BlogIcon canada goose expedition parka 2014.12.03 03:01  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  5. BlogIcon moncler italia 2014.12.03 04:03  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  6. 匿名 2014.12.03 05:44  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  7. BlogIcon moncler jersey coat 2014.12.05 04:02  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  8. BlogIcon furla bags online 2015.01.02 18:11  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  9. 匿名 2015.01.15 12:21  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  10. 匿名 2015.01.19 10:54  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  11. BlogIcon furla bags sale 2015.02.02 02:01  수정/삭제  댓글쓰기

    관는PNC Financial And Keycorp In November

    "I am more and more impressed with the possibilities of history's repeating itself on many different counts, " Benjamin Graham

    Given market enthusiasm following the temporarily resolution of discord in Washington,louis vuitton handbags, it's probably not a stretch to guess a return of partisanship ahead of January's budget debate will provide investors w예일

  12. BlogIcon burberry purses outlet 2015.02.18 19:18  수정/삭제  댓글쓰기

    법간Rating the flavor landing along with 3 treat quality recipes

    Listed here are 3 meals methods that will help you property which proverbial landing whilst friends and family chow lower throughout the Extremely Dish. As well as all these successful performs could be performed mainly ahead of time to help you benefit from the online game as well.

    Strategy the treat assault. Certain, you are able일가

  13. BlogIcon tory burch reva flats 2015.03.07 16:31  수정/삭제  댓글쓰기

    는가ligaments orthopedic

    My boyfriend is in his early 30s, average weight and height, and does not exercise very often other than the occasional game of tennis.

    Last week, he twisted his ankle while walking,mont blanc outlet, felt searing pain, and was immobile for two days. He did the usual rest, ice, compression, elevation routine, and it seems totally fine now.

    A few months ago, he woke up서료

  14. BlogIcon oakley sunglassses outlet 2015.03.18 21:30  수정/삭제  댓글쓰기

    일서Inside Senegalese shoes money

    NGAYE MEKHE, Senegal (AP) It is utilized years regarding cobblers with this particular city to understand the particular pointy toed slip-ons the moment well-liked by close by nobleman, now thought to be an important design product related to properly fitted Senegalese guys.

    This particular simply needed many weeks for your Oriental to be able to replicate in ad스수

  15. BlogIcon discount oakley sunglasses 2015.03.18 21:58  수정/삭제  댓글쓰기

    리예Steps to make the Hemp Band along with 2 Colours

    Hemp anklet bracelets which are therefore well-liked amongst teens these days,louis vuitton luggage set, because of their own design quotient as well as cost are manufactured from the grow which is one of the exact same genus since the grow that marijuana comes. Hemp, the actual grow that produces the actual through item for that produce associat가데

  16. BlogIcon furla candy purse 2015.03.19 01:00  수정/삭제  댓글쓰기

    선수Marriage ceremony Treat Adornments In addition to Marriage ceremony Treat Dessert cake toppers

    Marriage ceremony treat toppings in addition to Marriage ceremony treat adornments (aka Marriage ceremony treat toppers) will be the outgrowth related to several older traditions via worldwide. In the united states Marriage ceremony treat toppings, adornments, in addition to dessert cake toppers resul습리

  17. BlogIcon mont blanc wallets 2015.03.24 02:41  수정/삭제  댓글쓰기

    마어6 crucial Obamacare times to view with regard to within 2014

    The actual arriving 12 months would have been a critical 1 for that Inexpensive Treatment Behave: The actual primary aspects of the actual capturing healthcare regulation get into complete impact, a few of the last customer rights is going to be in position, and also the midterm elections may once again place the regulation within the데일

  18. BlogIcon vetement burberry 2015.03.27 21:10  수정/삭제  댓글쓰기

    상어car c'est > mais il veut pas >Yi 劻 n'est pas du tout comme serviteur a pris le rouge. de r&eacute;alisations mais aussi de r&eacute;alisations. et a ordonn&eacute; d'abandonner la ville sous - Direction Aihui, et de la Chine).- patrouille recommand&eacute;e par 100 de l'or,e sauf a particip&eacute; &agrave; la campagne de Shanghai l'agitation des dizaines de fois,| | casser quelques œufs nid?Mais 마습

  19. BlogIcon oakley outlet 2015.04.01 21:03  수정/삭제  댓글쓰기

    어리stated simon,michael kors purse

    This created a person appear instantly youthful as well as stylish, such as azure denim jeans within the sixties. This experienced the non-fashiony attractiveness. This came upon army as well as wearing prototypes. All of us appreciate heading out to consume each and every right now as well as dealing with ourself to some great dinner. There are many inexpensive 분리

  20. BlogIcon oakley store 2015.04.13 01:23  수정/삭제  댓글쓰기

    전일Identify Verbals as well as Spoken Key phrases

    This can be a type that's been visiting the actual fore a lot more within the present times whenever talking about things like a great guide. Individuals may state that it's a great 'read'. The 'verbal' is really a action-word type which features inside a phrase like a noun, a good adjective, or even a good adverb. The 'verbal phrase' is really a s있드

  21. BlogIcon oakley outlet 2015.04.14 13:49  수정/삭제  댓글쓰기

    정이Metal Policeman arranged with regard to triathalon fundraiser

    The actual Halifax Local Law enforcement sergeant isn basically match. Your woman carried out a lot of fifty percent triathlons your woman may depend all of them. Upon August.

    Hart locomotives no less than 3 several hours each day, along with a optimum 10 which following a 10 hr change.

    For all those people that wear invest fif단지

[BackGroundWorkerTEST] Sync , Async , Thread





주요 Code




MSDN
http://msdn.microsoft.com/ko-kr/library/system.componentmodel.backgroundworker(v=VS.90).aspx?appId=Dev10IDEF1&l=KO-KR&k=k(EHINVALIDOPERATION.WINFORMS.ILLEGALCROSSTHREADCALL);k(TargetFrameworkMoniker-".NETFRAMEWORK&k=VERSION=V3.5");k(DevLang-CSHARP)&rd=true




Created with colorer-take5 library. Type 'csharp'

//sync
        private void testCodeSync()
        {
            using (System.Net.WebClient wc = new System.Net.WebClient())
            {
                wc.DownloadFile(streamPath, "test_"+checkTime.ToString()+currentState+".tmp");
            }
            stateTx.Text = currentState + " :: done";
        }


        //async
        private void testCodeAsync()
        {
            using (System.Net.WebClient wc = new System.Net.WebClient())
            {
                wc.DownloadFileAsync(streamPath, "test_" + checkTime.ToString() + currentState + ".tmp");
            }
            stateTx.Text = currentState + " :: done";
        }
        

        
        //################
        //backgroundworker
        BackgroundWorker bw = new BackgroundWorker();
        void BGWorker()
        {
            //bw = new BackgroundWorker();
            bw.RunWorkerAsync();
            bw.DoWork += new DoWorkEventHandler(bw_DoWork);
            bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted);
        }
        

        void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            //RunWorkerCompleted 이벤트 안에서는 윈폼 스레드로 돌아와 안전��게 컨트롤 할�� 있다.
            stateTx.Text = currentState + " :: done";
            bw.Dispose();
        }

        void bw_DoWork(object sender, DoWorkEventArgs e)
        {
            using (System.Net.WebClient wc = new System.Net.WebClient())
            {
                wc.DownloadFile(streamPath, "test_" + checkTime.ToString() + currentState + ".tmp");
            }
            //에러! : 크로스 스레딩 ( 스레드가 다르다 )
            //stateTx.Text = currentState + " :: done";
        }
인터넷 속도가 빠를경우 테스트가 잘 되지 않지만 Async 도 처음에 실행할때는 약간의 딜레이가 생긴다
sync 는 항상 딜레이가 생긴다.
테스트 타겟은 구글의 메인페이지 이다.
Yamecoder 야매코더_
C# 2010. 12. 4. 02:26

댓글을 달아 주세요

  1. 이전 댓글 더보기
  2. BlogIcon Fitflop NZ Sale Online 2014.10.14 18:14  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  3. BlogIcon meizitang botanical slimming 2014.10.23 13:50  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  4. BlogIcon meizitang 2014.10.28 12:29  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  5. BlogIcon mont blanc fountain pen��mont blanc pen��mont blanc pens��mont b 2014.10.28 12:30  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  6. BlogIcon Buy macbook pro from china 2014.11.01 21:28  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  7. BlogIcon burberry shawl 2014.11.01 23:27  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  8. BlogIcon moncler flavienne quilted jacket 2014.11.09 10:36  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  9. BlogIcon 眼镜批发 2014.11.12 00:50  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  10. BlogIcon Buy Samsung Phones 2014.11.12 03:16  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  11. BlogIcon moncler 70 tal 2014.11.12 11:44  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  12. BlogIcon moncler bambino shop online 2014.11.12 11:46  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  13. 匿名 2015.01.07 17:45  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  14. 匿名 2015.02.06 14:13  수정/삭제  댓글쓰기

    데니冒险岛服务端奇迹mu服务端传奇外传服务端风云无双服务端神迹服务端

    英雄王座travia服务端暗黑修仙服务端仙境传说ro服务端弹弹堂服务端

    蜀门服务端RF服务端丝路传说服务端倚天2服务端决战服务端征服-SF端


    传奇私服开服一条龙开区服务-

    魔域私服一条龙开区服务-


    传奇广告代理-

    IDC服务器以及空间租用-

    破天私服开服一条龙服务-


    客服咨询QQ(企鹅扣扣)1124999543

    Email:1124999543@qq.com

    更多商业版本免费开放下载




    遨腾科技梦幻真彩5D堡垒王国玛法战场韩国连击版传奇服务端



    遨腾科技新传奇全新3D界面装备打孔座骑技能镶嵌宝石英雄合击特别版传奇服务端



    遨腾科技已开5区独家传承宝盒2.06装备精炼属性转移特色赌神轻变升级版传奇服务端



    에런

  15. BlogIcon clubmaster Sunglasses 2015.03.05 17:04  수정/삭제  댓글쓰기

    다없the best way we'd like most efficientmedical attentidirectly to stick fitand fit same way our pets also desirecare, medical attention and prefer to stick fitand fit. additionally they get illness and disease hence additionally they require smartdoctors specialized to offer them hospital therapy. Doctors who're specialized in giving hospital therapy and attentidirectly to animals are referred to as그있

  16. 匿名 2015.03.31 08:50  수정/삭제  댓글쓰기

    단에Another challenge is of course the selection of the fastest checkout line in the supermarket, a feat that requires a vast array of skills and experience combining the assessment of shopper behavior (cash vs. check,Popular Shopping Destinations, self bagging vs. the delegation of bagging, possession of a store discount card vs. the often fictionalized "my spouse has the store discount card"), the k는없

  17. 匿名 2015.04.01 06:28  수정/삭제  댓글쓰기

    방일Black and military green. Each shoe has a cap of products 100% nylon with white leather on the tip, with white vulcanized sole. The following is a list detailing details log on to Nike Air Max 90.



    You could in a project file for the planning office is purpose Used MBT Women's Lami investment.Find ultimate solution for intelligent and affordable new and used office furniture.


    Quite ofte법법

  18. 匿名 2015.04.03 13:49  수정/삭제  댓글쓰기

    가메They are comfortable and keep your feet feel different! This year is tailored to the retro era, large and small, a wide range of classical styles are back to the attention of the population between the return series of the wind.



    Nike Air Max sneaker has a classic b-ball for a look around oreder the two basketball courts and also the pedestrian to complete. Nike Air Max 95, a draft model Spo수메

  19. 匿名 2015.04.03 17:37  수정/삭제  댓글쓰기

    있선Security Headaches



    O.K., so the iPad really won't reduce any costs in my business. Can we justify its business ROI through increased employee productivity? Ha! You try using one of those things for a few hours and then tell me how much actual work you accomplished. It's just too damn fun.



    Clients are going to ask me why I don't recommend it for their business. My employees are going 어알

  20. 匿名 2015.04.04 02:54  수정/삭제  댓글쓰기

    다방火车采集器html简单模板示范






    Fulfill Your Pocket Bike Desires with Mini Chopper Bikes







    [标签:来源]








    There are those among us who collect big toys not just for the sake of displaying them, but also of enjoying them to the fullest. Pocket bikes,How to Read a Woman's Body La, for example, are there to be ridden and seen in public in,Online Shopping- Choosing Awe, and customi관알

  21. 匿名 2015.04.09 00:24  수정/삭제  댓글쓰기

    서방Like the above, knitted hat and a jacket with a lining seam searsucker-like. We're not normally a heavy logo'd pieces, but the embroidered letters feels like a part of the winter-generic design.



    Few have left thoughts about the current collection. Moncler is not for everyone because not everyone can come from the look of nyloned painted in a bright color, but there are some interesting piec일있

[C# Thread]종료시 프로세스 죽이기



Thread 를 사용하고, 프로그램을 그냥 종료 하면 작업관리자에 프로세스가 완전히 죽지 않는

경우가 생긴다.

이때 C#의 ApplicationExit 이벤트로 처리해주어야 한다.




Application.ApplicationExit += new EventHandler(Application_ApplicationExit);


///....///



          void Application_ApplicationExit(object sender, EventArgs e)
        {
            try{
            server.Stop();
            if(clinet != null)
                clinet.Close();
            writer.Close();
            reader.Close();
            serverThread.Abort();
            }catch{}
        }
여기서 server는 TCPListener  이고 Client 는  TCPClinet 이고, writer 와 reader 는 

StreamWriter 와 StreamReader 이다.

여기서 serverThread 가  Thread   이다.


이런식으로  app 가 종료되는 시점을 파악하여 여지가 될만한것들을 모두 삭제하여야 한다.
 
Yamecoder 야매코더_
C# 2010. 12. 4. 00:16

댓글을 달아 주세요

  1. 이전 댓글 더보기
  2. BlogIcon wholesale nhl jerseys free shipping 2014.11.13 22:05  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  3. BlogIcon wholesale nhl jerseys 2014.11.15 02:07  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  4. BlogIcon moncler outlet milano 2014.11.28 08:27  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  5. 匿名 2014.12.03 05:44  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  6. BlogIcon cheap nhl jerseys 2014.12.05 00:01  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  7. BlogIcon Buy sony tv online 2014.12.22 01:04  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  8. BlogIcon Adidas Soccer Jerseys Wholesale 2014.12.27 08:16  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  9. BlogIcon Reebok Nfl Hoodies 2014.12.27 14:59  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  10. 匿名 2015.01.14 18:29  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  11. 匿名 2015.01.15 12:22  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  12. 匿名 2015.01.19 10:54  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  13. BlogIcon 2014 All Star Jerseys 2015.01.29 01:35  수정/삭제  댓글쓰기

    는습Pittsburgh Pirates Jerseys NBA Jerseys nike authentic nfl jerseys ,Soccer Uniforms WholesaleSeattle Mariners Jerseys어기

  14. BlogIcon Wake Forest Demon Deacons Jerseys 2015.01.30 21:12  수정/삭제  댓글쓰기

    일관Boston Red Sox Jerseys Carolina Panthers Jerseys Detroit Tigers Jerseys 2014-2015 Soccer Jersey
    ,Cleveland Indians Jerseys련는

  15. BlogIcon Cleveland Indians Jerseys 2015.02.01 01:58  수정/삭제  댓글쓰기

    서일Oakland Athletics Jerseys cheap Grizzlies jerseys usa dez bryant jersey shirt san antonio spurs jerseys
    ,Nevada Wolf Pack Jerseys,Discount Nfl Jerseys
    "It counts as one," he said, before adding,Baylor Bea, "I'd be lying if I told you that it didn't feel great to shut out Michigan, 31 to nothing,2014 All Star Jerseys nfl jerseys clearance Cincinnati Bengals Jerseys miami dol,Cheap Nhl Jerseys,Wh서종

  16. 匿名 2015.02.06 14:13  수정/삭제  댓글쓰기

    단뉴永恒之塔服务端传奇服务端密传-服务端QQ西游私服务端天堂1私服务端

    千年服务端蜀门服务端征途服务端机战服务端神泣服务端醉西游服务端

    天堂I服务端挑战OL服务端剑侠情缘-服务端奇侠XIAH服务端挑战服务端


    传世开私服一条龙服务-

    传奇开私服一条龙开区服务-


    传奇广告代理-

    IDC服务器以及空间租用-

    魔兽世界sf开服一条龙服务-


    客服咨询QQ(企鹅扣扣)1285574370

    Email:1285574370@qq.com

    更多商业版本免费开放下载




    天恒科技1.95皓月终极12星座道士加强升级版



    天恒科技1.85荣耀必杀极限之地广寒宫泡点元素PK版



    天恒科技1.85无特戒无英雄轻中变魔神唯我独尊麻痹宝宝



    天恒科技独家1.85恶魔世界装备分身15转八钻靓装元素中变版예일

  17. 匿名 2015.02.06 14:13  수정/삭제  댓글쓰기

    표리传奇世界服务端刀剑服务端十二之天服务端新天骄服务端卧龙吟服务端

    真封神服务端惊天动地服务端红月服务端魔力宝贝服务端飞飞务服务端

    劲舞团服务端热血江湖服务端倚天I服务端网页游戏服务端天堂2服务端


    热血江湖开sf一条龙服务-

    传世开私服版本一条龙服务-


    传奇广告代理-

    IDC服务器以及空间租用-


    客服咨询QQ(企鹅扣扣)1207542352

    Email:1207542352@qq.com

    更多商业版本免费开放下载




    起点数据图腾变身1.950已开十六区永恒皓月淘宝商城无特戒无



    起点数据独家1.90七彩刺影狂雷合击绝杀版传奇服务端



    起点数据1.995已开四区变身皓月特殊副本积分系统太极魔阵三



    起点数据1.96黄金丛林传奇庄园聚魔禁地天地使者黄金皓月版传



    起点数한마

  18. BlogIcon trench burberry homme 2015.03.31 00:04  수정/삭제  댓글쓰기

    는있URL aIci,basket burberry pas cher相关的主题文章:메표

  19. 匿名 2015.04.03 17:39  수정/삭제  댓글쓰기

    로에Use cell phone text spy software to gain peace of mind. Every parent finds themselves concerned over their child's activities at some point or another. It's a difficult time for parents: as their children learn how to be more independent,5 Singapore Shopping Centres For the Shopaholics_54110., they are left in the strange vacuum of not having quite as much control over their children as before. Ma니니

  20. 匿名 2015.04.05 10:19  수정/삭제  댓글쓰기

    일습In fact,Why Should You Think About Mo, AIRMAX and not stand still, today we join in the use of special powers of the Nike Air Max 2009 sale, AIRMAX identification of a new era to create. Nike Air Max 2009 sale, the use of a feature of the technology of today's most ardent Flywire.



    Although the use of new technologies and maintaining AIRMAX traditional shoe design line of the body, new techn그메

  21. 匿名 2015.04.08 09:20  수정/삭제  댓글쓰기

    일되火车采集器html简单模板示范






    An In Depth Look At The Ever Popular BMX Bikes







    [标签:来源]








    Sales of BMX bikes are increasing faster than almost any other type of bicycle. BMX bikes can be seen on every street, sidewalk and even in their natural habitat, off-road. Even if you never leave your house you've certainly seen such bikes on TV. Sure, you probably know what a BMX b마메

[BeginInvoke] Delegate 로 스레드에 매개변수 전달하기



보통 스레드를

Thread t = new Thread( new ThreadStrat(Method) );

의 형태로 사용 하는데 Method 에 매개변수를 전달하지 못한다는 제약이 있다.

그래서  delegate 의 BeginInvoke 메소드를 통해 스레드를 작성해보자.




Created with colorer-take5 library. Type 'csharp'

/*
 * SharpDevelop으로 작성��었습니다.
 * 사용자: jjongun
 * 날짜: 2010-02-04
 * 시간: ��후 4:48
 * 
 */
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Net;
using System.Diagnostics;

namespace testSockerServer
{
    /// <summary>
    /// Description of MainForm.
    /// </summary>
    public partial class MainForm : Form
    {
        //스레드로 만들 델리게이트 선언
        delegate void runDele(string str);
        public MainForm()
        {    
            InitializeComponent();
            
            Trace.WriteLine("��제 메인 스레드 id: " +Thread.CurrentThread.ManagedThreadId);
            
            //델리게이트 생성
            runDele d = new MainForm.runDele(this.initServer);
            //BeginInvoke 로 매개변�� 전달
            d.BeginInvoke("string value",null,null);
        }
        
        private void initServer(string str)
        {
            Trace.WriteLine("델리게이트로 만든 스레드 id: " +Thread.CurrentThread.ManagedThreadId +"\n"
                           +str);
        }
    }
}

/**
 *   출력 : 
 * 
 *  ��제 메인 스레드 id: 1
 *    델리게이트로 만든 스레드 id: 3
 *     string value
 *  
 * */
Yamecoder 야매코더_
C# 2010. 12. 4. 00:11

댓글을 달아 주세요

  1. 이전 댓글 더보기
  2. BlogIcon amazon 2013.10.28 15:47  수정/삭제  댓글쓰기

    어에Style= "font-size:14px;" > we reach out, caught in the darkness of the night, but not familiar with temperature.

    and nbsp; Portefeuilles burberry



    -- Preface; I walked through the underground parking lot, the dim light, a woman far종지

  3. BlogIcon veste ralph lauren 2013.10.30 13:33  수정/삭제  댓글쓰기

    및마Style= "font-size:14px;" >




    @ one person show off anything, indicating a lack of what is inside the
    @ the world is neither money, nor the right people in the world, it is the people of the world.
    @ marriage is not an affair of the killer, but time.
    @ when you have vanessa bruno pas cher nothing to lose, you began to get.
    @ allowing a stranger began, but can not tolerate the pr뉴메

  4. BlogIcon 泡沫包装 2014.01.03 18:16  수정/삭제  댓글쓰기

    어메   茶树本来不过是一棵在大自然中萌芽、开花,年复一年枝繁叶茂、愈加粗壮的植物,枝条的扩展是为了更接近天空,是为了寻找更多的自由空间。或许它也有自己的寿命,在几十年几百年后的某一天轰然倒下,将身躯交还大地,给土地一份滋养。

      而茶树上的叶子,它本来是众多绿色中的一个点,是一个像素。如果不是被神农氏或另外一个聪明人发现, 它来到人间的使命大概也只是为玻璃冷却器了世界增添一份绿色生机,给空气带来一缕清新。

       几乎所有的上海人,都会认为囱茶就是安吉白茶。

       我们平时喝茶,经常喝到绿茶、花茶、红茶、乌 龙茶,很少喝到白茶。而说到白茶,大家可能首先联想到的是安吉白茶,并理所当然地把它当做白茶的代表。事实上,安吉白茶是绿茶,它之所以被叫做白茶,是因为其加工原料来自一种嫩叶白化为纯白色的茶树。关于安吉白茶,在安吉的县志中是这样记载的:"枝头所抽之嫩叶色白如玉,焙后微黄,为当地의비

  5. BlogIcon 匿名 2014.01.12 21:12  수정/삭제  댓글쓰기

    마고每一位刚刚踏入网赚行业的同学心中或许有这样几个问题:

    1、做网赚有多少人是赚到钱的?

    答:不足5%!

    2、网赚为什么那么吸引人?

    答:因为看起来赚钱好像很轻松。单现实情况是95%的人赚不到钱,5%的人却赚得不亦乐乎!

    3、为什么95%的人赚不到钱?

    答:因为这些人不知道网上赚钱的方法,或者没有足够的执行力!

    4、为什么5%的人赚得不亦乐乎?

    答:因为这些人懂得网上赚钱的方法,同时又有足够的执行力!

    5、如果想在网上赚钱应该怎么做?

    答:第一是学习!第二是执行!

    网络最赚钱淘客兼职挂机注册推广挣钱网赚方法比特币btc矿池guild挖矿客户端教程

    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-메메

  6. BlogIcon 匿名 2014.02.12 02:41  수정/삭제  댓글쓰기

    일이天津代办免考驾照电话15625068838


    南昌哪里可以买驾照电话15625068838


    九江代办驾驶证增驾电话15625068838


    吉林办理真实驾照电话15625068838정알

  7. BlogIcon 匿名 2014.02.12 02:42  수정/삭제  댓글쓰기

    는이贺州代办免考驾照电话15625068838


    河池哪里可以买驾照电话15625068838


    来宾代办驾驶证增驾电话15625068838


    崇左办理真实驾照电话15625068838없일

  8. BlogIcon 匿名 2014.08.19 14:27  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  9. BlogIcon 850压瓦机 2014.08.31 11:06  수정/삭제  댓글쓰기

    크고 ,HT-54-410-;








    24-210-840型琉璃瓦机
    ,法兰的生产,三层压瓦机;
    压型钢板型号 24-210-840 用途
    有效覆盖宽度(mm) 840
    展开宽度(mm) 1000 屋面板、墙面板
    波高(mm) 24
    板厚(mm) 0.3-0,45度高压弯.8


    ,泡沫切割机;











    来源:마전

  10. BlogIcon 匿名 2014.09.11 12:19  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  11. BlogIcon woolrich vest 2014.09.18 00:27  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  12. BlogIcon 匿名 2014.09.28 14:39  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  13. BlogIcon chanel earrings 2014.10.07 12:45  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  14. BlogIcon 深圳横岗眼镜批发 2014.11.12 00:51  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  15. BlogIcon picasa web giubbotti moncler 2014.11.12 11:44  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  16. BlogIcon moncler sale new york 2014.11.12 11:46  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  17. BlogIcon Moncler Outlet Canada 2014.12.30 08:19  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  18. 匿名 2015.01.19 10:54  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  19. 匿名 2015.03.01 14:22  수정/삭제  댓글쓰기

    및일大话西游服务端凡人修真服务端大话西游服务端页游服务端问道服务端

    跑跑卡丁车服务端英雄远征服务端幻灵游侠私服务端洪荒神话私服务端

    完美世界服务端烈焰服务端洛汗服务端新魔界服务端绝对女神私服务端


    魔兽私服开区一条龙服务-

    传奇私服开传奇一条龙服务-


    传奇广告代理-

    IDC服务器以及空间租用-

    魔域开区sf一条龙开区服务-


    客服咨询QQ(企鹅扣扣)1325876192

    Email:1325876192@qq.com

    商业版本免费开放下载




    紫川科技最新毁灭天下1.85狂雷独家合击热血复古三职业新装传奇服务端



    紫川科技20星大极品良装+80麒麟锻造中变传奇服务端



    紫川科技独家轻变1.89奥妙转生神龙锻造珍珑元素版传奇服务端



    紫川科技独家九转1.85四皇冠加倍装备特戒龙卫련네

  20. BlogIcon t shirt burberry 2015.03.27 21:10  수정/삭제  댓글쓰기

    메일(Huan) arme de philosophes Fengyang porte dragon seulement ceux de l'empereur Voir" c'est - &agrave; - dire Huan plusieurs fils et les portes de Fengyang Ville il y burberry femme a un long ancr&eacute;s au - dessus de la grille mais seulement Huan et Yang peut voir| | Yang grandi moche pas de mouvementSelon le Nord sept septi&egrave;me volume de Qi Ji: | | "et le Secr&eacute;taire g&eacute;n&eacu조에

  21. BlogIcon trench coat burberry 2015.03.31 00:04  수정/삭제  댓글쓰기

    는없Le Kenya de colonnes de plus d'une centaine de "tigre" liste de quatre ministres le mme jour d&eacute;missionn&eacute; - sohu News Source: Sohuhttp://basketburberrypascher. repr&eacute;sentant du Congr&egrave;s national de la zone portuaire 谭惠珠 Priscilla,t shirt burberry,Une &eacute;tude nationale de Hong Kong et de Macao,Visible, appelle l'appel d'urgence; deuxi&egrave;mement,Les frais &agrave; p드지

Powerd by Tistory, designed by criuce
rss