Skip to content

Instantly share code, notes, and snippets.

View emil-perhinschi's full-sized avatar

Emil Perhinschi emil-perhinschi

  • Dărmănești, Suceava, Romania
  • 14:42 (UTC +03:00)
  • X @emilper
View GitHub Profile
@manwar
manwar / thread-lifecycle.md
Last active March 1, 2025 16:32
Thread Lifecycle in Perl and Python.

-- Back to Index --


To understand the thread, one needs to fully grasp the lifecycle of thread i.e. from start to finish.

In Perl, the only threading model available is ithreads (interpreter threads), which is implemented via the threads module. In Perl, threads are ithreads, meaning each thread has its own Perl interpreter. Data is not shared by default, and you must explicitly use threads::shared to share variables. A lock is used to ensure thread-safe access to shared data.

  +-----------------+---------------------------+--------------------------------+
  | Feature         | Python                    | Perl                           |

+-----------------+---------------------------+--------------------------------+

@Ovid
Ovid / cor.md
Last active September 12, 2021 08:02
Cor—A minimal object system for the Perl core

NAME

Cor — A minimal OO proposal for the Perl core

VERSION

This is version 0.10 of this document.

AUTHOR

@lastlegion
lastlegion / webpack.config.js
Last active August 9, 2016 12:32
Minimal webpack config to get started with React and ES2015
module.exports = {
entry: "./public/javascripts/src/App.jsx", //entry point of your app
output: {
filename: "./public/javascripts/build/bundle.js" //output transpiled and compiled code
},
module: {
loaders:[
{
test: /\.js[x]?$/, //list of extensions
exclude: /node_modules/,
@vivithemage
vivithemage / libmagic_example.c
Last active April 1, 2025 00:50
libmagic.h example
#include <stdio.h>
#include <magic.h>
int main(void)
{
char *actual_file = "/file/you/want.yay";
const char *magic_full;
magic_t magic_cookie;
/* MAGIC_MIME tells magic to return a mime of the file,
@mobius
mobius / libzip_simple.c
Last active May 19, 2024 10:47
using libzip to extract files
/* Copyright (C) 2011 rocenting#gmail.com */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/resource.h>
@dex4er
dex4er / soap-calculator-client.pl
Created November 15, 2011 19:07
XML::Compile::SOAP example client
#!/usr/bin/env perl
use warnings;
use strict;
use XML::Compile::WSDL11;
use XML::Compile::SOAP11;
use XML::Compile::Transport::SOAPHTTP;
use HTTP::Tiny;