yuan
ArchLinux@ThinkPad X220 控制风扇转速
安装 thinkfan 和 lm_sensors。
编辑 /etc/modprobe.d/thinkfan.conf 文件:
options thinkpad_acpi fan_control=1 experimental=1
执行 modprobe thinkpad_acpi
编辑 /etc/thinkfan.conf 文件:
sensors:
- hwmon: /sys/devices/virtual/thermal/thermal_zone0/temp
# indices: [0]
fans:
- tpacpi: /proc/acpi/ibm/fan
levels:
- [0, 0, 41]
- [1, 38, 51]
- [4, 45, 56]
- [7, 51, 78]
#- [7, 55, 64]
#- [7, 60, 66]
#- [7, 63, 72]
#- [7, 65, 74]
- [127, 75, 32767]
试试 thinkfan -n 看是否能够正常执行。如果运行正常,启动 thinkfan 服务:systemctl enable thinkfan --now
链接:
https://wiki.archlinux.org/title/Fan_speed_control
https…
steve lee
Concurrency in Ruby: Thread and Fiber
Fibers and Threads
Example: HTTP request
Example: HTTP server
Fiber Scheduler
Concluding
The content of this article is my last tech sharing with my team at https://pixta.vn/.
Fibers and Threads
Thread
thread = Thread.new do
#...
end
thread.join
Fiber
fiber = Fiber.new do
#...
end
fiber.resume # transfer / Fiber.schedule
As you can see, they have quite similar syntax, so what are the differences between them?
The level:
Threads are created 1:1 with threads on OS.
Fibers are implemented at the programming language level, multiple fibers can run inside a thread.
Scheduling mechanism:
Threads are run…