Changeset 12027
- Timestamp:
- 07/02/09 13:56:20 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/LispThread.java
r11969 r12027 108 108 this.name = name; 109 109 map.put(javaThread, this); 110 try { 111 javaThread.setName(name.getStringValue()); 112 } catch (ConditionThrowable ex) { 113 Debug.trace("Failed to set thread name:"); 114 Debug.trace(ex); 115 } 110 116 javaThread.setDaemon(true); 111 117 javaThread.start(); … … 1022 1028 // ### threadp 1023 1029 private static final Primitive THREADP = 1024 new Primitive("threadp", PACKAGE_EXT, true, "object") 1030 new Primitive("threadp", PACKAGE_EXT, true, "object", 1031 "Boolean predicate as whether OBJECT is a thread.") 1025 1032 { 1026 1033 @Override … … 1033 1040 // ### thread-alive-p 1034 1041 private static final Primitive THREAD_ALIVE_P = 1035 new Primitive("thread-alive-p", PACKAGE_EXT, true, "thread") 1042 new Primitive("thread-alive-p", PACKAGE_EXT, true, "thread", 1043 "Boolean predicate whether THREAD is alive.") 1036 1044 { 1037 1045 @Override … … 1051 1059 // ### thread-name 1052 1060 private static final Primitive THREAD_NAME = 1053 new Primitive("thread-name", PACKAGE_EXT, true, "thread") 1061 new Primitive("thread-name", PACKAGE_EXT, true, "thread", 1062 "Return the name of THREAD if it has one.") 1054 1063 { 1055 1064 @Override … … 1075 1084 1076 1085 // ### sleep 1077 private static final Primitive SLEEP = new Primitive("sleep", "seconds") 1086 private static final Primitive SLEEP = new Primitive("sleep", PACKAGE_CL, true, "seconds", 1087 "Causes the invoking thread to sleep for SECONDS seconds.\nSECONDS may be a value between 0 1and 1.") 1078 1088 { 1079 1089 @Override … … 1093 1103 // ### mapcar-threads 1094 1104 private static final Primitive MAPCAR_THREADS = 1095 new Primitive("mapcar-threads", PACKAGE_EXT, true) 1105 new Primitive("mapcar-threads", PACKAGE_EXT, true, "function", 1106 "Applies FUNCTION to all existing threads.") 1096 1107 { 1097 1108 @Override … … 1113 1124 // ### destroy-thread 1114 1125 private static final Primitive DESTROY_THREAD = 1115 new Primitive("destroy-thread", PACKAGE_EXT, true) 1126 new Primitive("destroy-thread", PACKAGE_EXT, true, "thread", 1127 "Mark THREAD as destroyed.") 1116 1128 { 1117 1129 @Override … … 1136 1148 // order is not guaranteed. 1137 1149 private static final Primitive INTERRUPT_THREAD = 1138 new Primitive("interrupt-thread", PACKAGE_EXT, true) 1150 new Primitive("interrupt-thread", PACKAGE_EXT, true, 1151 "thread function &rest args", 1152 "Interrupts THREAD and forces it to apply FUNCTION to ARGS.\nWhen the function returns, the thread's original computation continues. If multiple interrupts are queued for a thread, they are all run, but the order is not guaranteed.") 1139 1153 { 1140 1154 @Override … … 1161 1175 // ### current-thread 1162 1176 private static final Primitive CURRENT_THREAD = 1163 new Primitive("current-thread", PACKAGE_EXT, true) 1177 new Primitive("current-thread", PACKAGE_EXT, true, "", 1178 "Returns a reference to invoking thread.") 1164 1179 { 1165 1180 @Override … … 1172 1187 // ### backtrace-as-list 1173 1188 private static final Primitive BACKTRACE_AS_LIST = 1174 new Primitive("backtrace-as-list", PACKAGE_EXT, true) 1189 new Primitive("backtrace-as-list", PACKAGE_EXT, true, "", 1190 "Returns a backtrace of the invoking thread as a list.") 1175 1191 { 1176 1192 @Override
Note: See TracChangeset
for help on using the changeset viewer.