![]() TERMINATION AND RELEASE OF SECURITY INTEREST IN PATENTS Assignors: BANK OF AMERICA, N.A., AS LENDER Assigned to BANK OF AMERICA, N.A., AS ADMINISTRATIVE AGENT reassignment BANK OF AMERICA, N.A., AS ADMINISTRATIVE AGENT NOTICE OF GRANT OF SECURITY INTEREST IN PATENTS Assignors: ZYNGA INC. Assignors: MARTONE, RAY Assigned to BANK OF AMERICA, N.A., AS LENDER reassignment BANK OF AMERICA, N.A., AS LENDER NOTICE OF GRANT OF SECURITY INTEREST IN PATENTS Assignors: ZYNGA INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.) Filing date Publication date Priority to US13/100,179 priority Critical patent/US8562441B1/en Application filed by Zynga Inc filed Critical Zynga Inc Priority to US13/244,843 priority patent/US8449397B2/en Publication of US20120283008A1 publication Critical patent/US20120283008A1/en Application granted granted Critical Publication of US8449397B2 publication Critical patent/US8449397B2/en Assigned to ZYNGA INC. Original Assignee Zynga Inc Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.) ![]() ( en Inventor Ray Martone Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.) Active Application number US13/244,843 Other versions US20120283008A1 Google Patents Secure, parallel, and independent script executionÄownload PDF Info Publication number US8449397B2 US8449397B2 US13/244,843 US201113244843A US8449397B2 US 8449397 B2 US8449397 B2 US 8449397B2 US 201113244843 A US201113244843 A US 201113244843A US 8449397 B2 US8449397 B2 US 8449397B2 Authority US United States Prior art keywords game script event client player Prior art date Legal status (The legal status is an assumption and is not a legal conclusion. Google Patents US8449397B2 - Secure, parallel, and independent script execution Once you have a list of delegates you can process them the same as the existing Handler method above.US8449397B2 - Secure, parallel, and independent script execution Then in the Handler method you would extract the delegate list via Delgate.GetInvocationList(). With a little work you could adapt the above class to expose an event so that listeners can subscribe and unsubscribe at will. Any shared state being changed now needs to be synchronized, etc. Lastly you need to be aware of other concerns regarding multi-threaded code. Static void Test2(Object sender, EventArgs args)Īs expected the program above runs them in parallel as demonstrated by the following output: Start Test 1 Static void Test1(Object sender, EventArgs args) ![]() IAsyncResult asyncResults = new IAsyncResult Public void Handler(Object sender, TEventArg args) Throw new ArgumentNullException("moreHandlers") ![]() Throw new ArgumentNullException("handler1") Public ParallelEvent(EventHandler handler1, params EventHandler moreHandlers) Private readonly EventHandler _moreHandlers class ParallelEvent where TEventArg : EventArgs The first event provided runs inline with the event call while all others are executed on the default thread pool. Here is a quick-and-dirty class to demonstrate this. This is easy enough to wrap up in a class however, you need to aggregate all the event handlers into a single event handler before subscribing to the desired event.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |