From: Fred C. <fc...@al...> - 2010-10-20 16:32:00
|
There may be applications that would want to know times for threads for things like timeouts, real-time processing, optimization, limited investment in one of many strategies, etc. This is done during operation so that the process can make decisions as it operates about what to do next, and so that other processes can exchange such data for more global decisions. FC On 10/20/10 7:56 AM, Sam Steingold wrote: > Don Cohen wrote: >> I don't see any doc describing how get-internal-run-time works >> in the presence of MT. I suppose it should measure the total >> run time for all threads, and that total might advance faster than >> real time. > > I think so. > >> It occurs to me that it would be nice to be able to measure the run >> time in a single thread. Similarly the time macro would seem more >> useful if it only measured the time spent in a single thread. >> However, it might make more sense to define a separate mt time macro >> to do that. > > What are the use cases? > > 1. Profiling. This is done during development, so the programmer can make sure > that only one thread is busy; the current behavior of reporting global time and > allocations (for TIMES) is appropriate. While it is conceivable that a user > might want to profile a specific thread (other than the current one), I am not > sure this is worth the extra effort. > > 2. Progress reporting. I think it would be nice to be able to report the run > time for individual threads. > Either get-internal-run-time should return 2 values: global and local to this > thread, or it should take an optional thread argument and return global time by > default and the time for the specified thread otherwise. > I am not sure that the second interface is feasible (i.e., whether both unix > and win32 allow timing of other threads). > > Sam. > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > clisp-list mailing list > cli...@li... > https://lists.sourceforge.net/lists/listinfo/clisp-list > > > -- -This communication is confidential to the parties I intend it to serve- Fred Cohen & Associates tel/fax: 925-454-0171 http://all.net/ 572 Leona Drive Livermore, CA 94550 Join http://groups.google.com/group/fca-announce for our mailing list |